creating a role with restricted permissions about countries in drupal 8 - drupal-modules

I'm new to drupal 8 dev and I have an issue creating a custom role with custom permissions.
Actually, I need to create a role based on admin permissions, but restricted to countries affected to this new role by the admin.
Thanks in advance for your help

Hopefully, I've not misunderstood your question, but if you want users to have permissions based on the content itself, rather than by the content type. You should look into the permissions by term module.
https://www.drupal.org/project/permissions_by_term
So if for example, you have a Drupal site where you have content tagged to countries, you could use this module to have a country-specific editor who can only edit the content tagged to their country.

Related

Kentico roles and ui personalization

I need to give permissions to edit/create/destroy pages in a node to a group of users.
I've created a group and added a test user to that group.
I can't seem to give permission to the Pages application so see if i can see the node.
I also added game this role permissions at the node level too.
Ideally this editor role would be able to create new sub pages, which also means being able to upload media.
Your new user must have editor privilege level (you can edit user in Users application). If you want to provide ability to see content in Pages app you have to grant the user with Browse tree and Read permission (content module). To satisfy your scenario you need to grand user with Modify and Create permissions, too (maybe Design?).
Just FYI: The approach provided by Brenden (cloning the role) is very handy but there a is chance you grant the user with permission you don`t want to provide (inappropriate permissions for original role).
I've found the most efficient method is review the out of the box roles provided by Kentico and clone the one which fits closest to your needs. Then modify your cloned role to add/remove abilities and permissions.
If you're unsure of what each role can and cannot do, create a new test user with one of the roles assigned to them and log in as them. Do the same for all the roles you want to test until you find the one closest to what you're looking for.

Liferay: Set VIEW permission to a DLFileEntry to users of a site

Is it possible to set VIEW only permission to a single document library file (DLFileEntry) to the users of a different site.
Example : DocumentA exists in SiteA and I want to set view permissions to all the users of SITEB only to this document.
Thanks for reading.
-Mike
You'll need some kind of indirection: Permissions in Liferay are handled through roles (teams behave as roles as well), not by other arbitrary groups of users. If you assign all the users to a user group and make that user group member of the site in question, as well as assign them to a role that you create for this purpose.

How to hide site membership option for site owner/admin in liferay

I have created a separate module for creating and assigning users for site admin/owners. So I don't want to show the "Site Membership" option under Users tab for both Site admin and owner.
How can I hide the Site Membership option?
Is there any way that the permission or configuration will do the
required change? Or do I need to create the hook?
Any suggestions please?
Rather than changing the semantics of Liferay's built-in roles, rather introduce your own custom roles and define the permissions that you want them to have. Create a "site role", choose "Define Permissions" and add what you need.
From your comment I understand that you want to use Site Admin, just not with everything this role comes with. It sounds strange to me that you're demanding a certain solution and favor one that doesn't work, but so be it.
You can check if it's possible to remove some permissions from the "Site Admin" role, but I'd expect a very hard-to-maintain-system resulting from this. Liferay has no means of "maintaining only the users that a certain Administrator has created". What you can do is: An Organization Administrator can administer all users in the organizations they're administering. This might be another solution for you.
Or alternatively, implement your own UI and do your custom (non-Liferay-based) permission checks in it. This UI will then enable your custom admins to administer the users that the UI provides for them.
But if you're stuck to a certain solution, you might be out of luck. Give us more details of your problem and we might come up with a solution unless you insist that your solution is the way to go.
With Permissions, no you can't. You can't change the permissions of the LR default role by UI at least.
You might have to go with hook or ext. One other way around is to do it with the theme. You might have to hook into Liferay's control panel theme.

Make the posts visible only to administrators in Drupal 6?

I have an administrator account in Drupal 6 and I have a lot of posts. I have then created a new authenticated user. When I log in using the new account, I can see all the posts the admin had posted even though the account I'm logged is not administrator account. I want to specify what posts the new account can only see. Is it on how my posts were posted using the administrator account or how my new account is created. Is there a way I can manage the administrator posts such that only administrator accounts can see it? Guide me here.. Thanks.
You're probably looking for the Content Access module:
This module allows you to manage permissions for content types by role and author. It allows you to specifiy custom view, edit and delete permissions for each content type. Optionally you can enable per content access settings, so you can customize the access for each content node.

Roles and Permissions Issue

I am using Orchard 1.3. I have created a content type named 'Product' and another one named 'Company'. Now, I want to allow some users to login to dashboard and create new company and product and edit ONLY company and product they had created.
So, I created a role and only gave permission to 'Edit Company' and 'Edit Product'. (eg:)
Also gave 'Access admin panel' permission.
I created a user and assigned the newly created role to him.
But when I login as that user, I can see the full navigation. Shouldn't the navigation be just limited to the content items the user has the access to? Also this user has access to not only just create new 'Product' and 'Company', but also other content types for which I had not given any permission.
Please suggest how I can limit the access of this role to just the two content types?
Thanks!
Please file a bug on CodePlex.
You should upgrade to 1.4. This issue has been fixed.

Resources