ElevatoDigital / dewdrop

Dewdrop makes writing complex WordPress plugins simpler by providing a sensible project layout and developer tools.
Other
11 stars 3 forks source link

Cannot view edit page because of edit permission #89

Closed bravadomizzou closed 7 years ago

bravadomizzou commented 7 years ago

When you set the edit permission to false it not only makes it so you cannot save changes, but it makes it so you cannot view the edit page. What do we think of making it so that the user can view the edit page by default but not make any changes in the process() method. Maybe even have a notice at the top of the page that says they cannot make any changes and remove the submit button. (could even go as far as making all of the fields readonly)

$component->getPermissions()->set('edit', false);

The use case for this is an auditor needs read only admin access.

bravadomizzou commented 7 years ago

The only real issues I see for this are with existing projects where you may have additional fields in the edit page that you don't necessarily want to show to someone who does not have the edit permission.

griffbrad commented 7 years ago

I think that is too large a change in meaning and behavior of that permission. I can help figure out how best to implement that on ProntoSpot in particular with you.