8 – Add extra custom permissions to Field Permissions

I’m using Field Permissions module to restrict access to each field.

If you choose custom permission on /admin/structure/types/manage/CONTENT_TYPE/fields/FIELD_NAME, you’ll see these permissions are available:

  • Enter own value for field [FIELD_NAME]
  • Edit own value for field [FIELD_NAME]
  • Edit any value for field [FIELD_NAME]
  • View own value for field [FIELD_NAME]
  • View any value for field [FIELD_NAME]

I would like to add some permissions with extra conditions like ‘Edit any value for field [FIELD_NAME] if the field is empty’.

For D7 version of the module there was a hook called hook_field_permissions_list_alter but there’s no such thing in D8 version.

Is there any way to modify the list?

permissions – Security threat after taking advice?

I was following some advice trying to fix some issues with my webcam and camera permissions. I followed the top comments answers but noticed some comments later speaking of potential security threats.


THIS IS BAD ADVICE. THIS RECURSIVELY CHANGES ALL PERMISSIONS OF ALL FILES AND DIRECTORIES IN YOUR HOME FOLDER AND POSES A SECURITY THREAT. ALSO IT IS NOT A DIRECT ANSWER TO THE QUESTION… (just to reiterate @qwerty_so, thank you) – jorijnsmit”
“Actually a bad advice. This will change the user permission to 644 for all files in your private folder. Thus is takes back that for protected files as well (like e.g. your ~/.ssh/id_rss which in turn is no longer accepted for ssh logins). Besides that it does not solve the issu. – qwerty_so “

Is there anything I can do to reverse what I’ve done?

Apps don’t show up in camera and microphone privacy settings in MacBook

finder – Lost Permissions Can’t Delete Folder

If you’re on an admin account, you should be able to click the lock, supply password, then click the + sign & add yourself as read/write.

If it won’t let you do that, then try on the next folder up the hierarchy, then click the ‘gearbox’ icon & ‘apply to all enclosed items’.

permissions – Create SharePoint Registration for Access

Right now, I have set up access to my SharePoint Communication site (SharePoint Online) so that I have Allow Access Requests turned on and requests going to a specified email. Is it possible to create a user form for the access request so that it asks for name, role, and email?

Thanks

8 – Own permissions for paragraphs and ECK entities

I have come quite far in my Drupal 8 development without needing to write much custom php code. However, I am using paragraphs and eck entities as referenced entities in content types. For users to be able to edit their own content, I need edit and delete permissions in paragraph and eck to apply to only own content. I looked up some hooks and wrote the below code in my theme file. It doesn’t work. Will appreciate any help in taking this to finish line.

  function THEME_entity_info_alter(&$entity_info) {
    $entity_info('contact_information_fields')('access callback') = 'THEME_ENTITYNAME_access';
  }
    
  function THEME_ENTITYNAME_access(DrupalCoreEntityEntityInterface $entity, $op, DrupalCoreSessionAccountInterface $account) {
    $user = DrupaluserEntityUser::load(Drupal::currentUser()->id());
    switch ($op) {
      case 'update':
      case 'delete':
        if ($entity->uid == $user->get('uid')) {
          return TRUE;
        }
        break;
    }
    
    return eck__entity_access($entity, $op, $account);
  }

miui – In Phone call, Microphone goes mute when opening any game. (Tried denying permissions, still facing)

Using Poco F1 (miui global 11.0.8). I abruptly go into mute when I boot up any games while in a normal phone call. This doesn’t happen in other apps. As I said, I tried denying microphone permissions for the game (Phone permission wasn’t required in there). Experienced this issue in Call of Duty mobile, Head Ball 2, etc., Is Game Turbo has anything to do with this issue? I can still hear them while gaming, whereas I’m muted until I exit the app (cries in embarrassment). I’d appreciate any help.

views – content access permissions issue

After changing the role in access control, and click Rebuild permissions button I’m getting an getting the below error
An AJAX HTTP request terminated abnormally. Debugging information follows. Path: /batch?id=1892&op=do StatusText: error ResponseText: ReadyState: 0
Also i’m not able to view the contents associated with this changes.

8 – I can’t change permissions for text filters

I performed a pretty massive 50,000+ node migration a few weeks ago (from Drupal 7.70 to Drupal 8.9), and just noticed today that some of the Text Filters aren’t visible in content creation pages (in particular, Plain text filter, which is what I like to make the default for most fields).

I tried creating a similar filter called “Plain”, but when defining the default filter for content types on text fields, though at least now the new filter is visible as on option from the select box, it won’t save (it reverts back to Full HTML filter on save). Furthermore, the filter permissions page shows that something is awry as well…as I am unable to assign ANY permissions for the new filter or two of the migrated filters to any custom roles.

Clearly the migration didn’t go smoothly. It took me 2 weeks to get ANY migration to work properly…so I really do no want to roll back and try again if possible. Is there any way I an fix the text filters and their respective permissions problem here?

I have full access to the server, mysql, etc. Is there something I should be looking for in particular? Or at least a DB model that I can copy?

Thanks in advance for your help.

enter image description here
enter image description here
enter image description here

EDIT: I just noticed that I can go into the individual user roles, and “see” the checkboxes that aren’t showing up on the Permissions matrix (where you can select permissions for all users at once). Is this maybe just a rendering bug for the main permissions display page? Here’s another screenshot:

enter image description here

custom field – Setting user permissions per post

I am trying to assign privileges on posts on a per post basis.

Essentially, I have a custom post type which have authors. They can edit their own posts.

I then have another role, which should be able to edit a subset of those posts bases on a custom field or taxonomy.

I can filter out the posts that appear in the backend using pre_get_posts, and applying a query based on the custom field. However I need to limit specifically edit privileges for each post.

Does anyone know if it’s possible to apply an “editable” filter per post rather than a blanket privilege based on the role?

Thanks!