Modules permissions
Created 6 years ago by sdr1989Hi everyone, I've created a couple of custom module in my pyrocms application, I would like to let the administrator choose the permissions (view, create, edit, delete) for other user, how can I add my custom module in the 'permissions' sections?
Thanks
sdr1989
—
6 years ago
@ryanthompson I'm using the last version but somehow the config folder wasn't created... anyway I followed your suggestion and now I'm set up! thank you so much!
Hey! If you are up to date and used the generators they should already have been created for you. But check this out for the default / auto-detect permissions: https://github.com/anomalylabs/pages-module/blob/2.3/resources/config/permissions.php
Read, write, and delete are all automatic (though you can manual test them too). And preview is a special case that's used like this: https://github.com/anomalylabs/pages-module/blob/2.3/src/Page/PageAuthorizer.php#L82-L84