statamic / v2-hub

Statamic 2 - Feature Requests and Bug Reports
https://statamic.com
95 stars 5 forks source link

FR: Allow add-ons to add permissions #1286

Open riasvdv opened 7 years ago

riasvdv commented 7 years ago

Expected behaviour

Add-ons should be able to define permissions to check against

Actual behaviour

Add-ons can't ☹️

edalzell commented 7 years ago

@Rias500 you can't create a ServiceProvider and jam the relevant permissions into the appropriate file/object?

riasvdv commented 7 years ago

Maybe, but that seems like a very hacky way, I've done it before with routes but that just feels like it could break any time Statamic updates

jcohlmeyer commented 7 years ago

Another use case ... give addons the ability to have a permission setting so users other than super users can modify the addons built in settings page.

See: https://github.com/jrc9designstudio/statamic-google-analytics/issues/4

jcohlmeyer commented 7 years ago

jrc9designstudio/statamic-video-embed could really benefit from this too ...

dannyuk1982 commented 7 years ago

+1 too

increasingly moving a lot of client (editor role) settings to add-ons, with CP configs - which they then cannot access