Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

profileRights #50

Open
DonutsNL opened this issue Jan 22, 2024 · 2 comments
Open

profileRights #50

DonutsNL opened this issue Jan 22, 2024 · 2 comments

Comments

@DonutsNL
Copy link

DonutsNL commented Jan 22, 2024

Hi,

I could realy use some help with the profileRights.

The only way i got some form of rights implemented is by actually borrowing the 'config' right and overloading the canCreate and canPurge methods (because the setup right only implements read and update). i.e

class myObject extends commonDBTM
{
    // only implements canRead, canUpdate;
    public static $rightname = 'config';        
    public static function canCreate() { return static::canUpdate(); }
    public static function canPurge() { return static::canUpdate(); }
}

So I was wondering, is there an easy way to add new item_types with default CRUD permissions to the existing profiles UI say the setup tab?

So far the only documentation i have found is about checking and adding custom permissions, not how to implement default CRUD rights on a new item_type in a way that also allows the user to 'configure' them in the default profiles menus. It always seems to require a tab to be added in which a custom form needs to be implemented. I would like to prevent the last and lean on the allready present implementation.

Thanks in advance,

@cedric-anne
Copy link
Contributor

Hi,

Sorry for the late reply. I do not think there is anything yet that could permit that.

@ChrisGralike
Copy link

ChrisGralike commented Feb 13, 2024

Hi Anne,
Thanks for the reply.

Wouldnt it be ideal if the rights are automatically generated based on normalized object properties?

This could be a nice way to normalize rights management for native GLPI objects as well as isolate the rights concern from the actual objects.

Ill use the current implementation moving forward.
rgrds,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants