andante

i suppose you could also remove the field, but thats up to you

deschebbs

thanks @andante! okay. havent thought of updateCMSFields yet. i'll see.

andante

something like

  1. public function updateCMSFields($fields)
  2. {
  3. if (!Permission::check('ContentAdmin')) {
  4. $fields->fieldByName('Content')->setReadOnly(true);
  5. }
  6. }

or whatever the actually syntax is for that

andante

i would probably use updateCMSFields() or whichever it is to set the field to readonly if the permission isn’t there

deschebbs

Hi, I would like to know, how I can restrict backend users access to the pages "Content" tab on a custom page type. I have implemented PermissionProvider an use the "canEdit" function that referes to the whole page with all tabs AFAIK. I have no idea how to restrict permission to the content tab. Of course I have created a user with restricted access and do not use admin privileges for this. Any idea?

sorokin

You could add the versioned extension to your DO, in live mode the unpublished objects will be automatically filtered out

taoceanz

With the ORM, is it possible to do soft deletes to keep data but makes it unavailable to query? I'm assuming this may be a manual thing to add a field to each table that marks as active or not and then to adjust all queries to filter any records to return only if marked as active.