A blog contains some posts, this site enables user to show,edit,delete,rating posts. my problem is some users only list the post and rate it, some users have permission to edit and delete post. admin have a permission to change the user permissions. How to implement in Symfony 2
Symfony Voters are what you are looking for.
Related
I am currently working on a wordpress website. It is both a blog and a forum.
bbPress Documentation says it has 5 roles:
Keymaster – Can create, edit and delete other users’ forums, topics
and replies. Can manage Tags, and moderate a forum with the moderation
tools. Has access to global forum settings, tools, and importer.
Moderator – Can create and edit forums. Can create, edit and delete
other users’ topics and replies. Can manage Tags, and moderate a forum
with the moderation tools.
Participant – Can create and edit their own
topics and replies.
Spectator – Can only read topics and replies.
Blocked – All capabilities are explicitly blocked.
Wordpress by default has 6 roles.
Super Admin – somebody with access to the site network administration
features and all other features. See the Create a Network article.
Administrator (slug: ‘administrator’) – somebody who has access to all
the administration features within a single site.
Editor (slug: ‘editor’) – somebody who can publish and manage posts including the
posts of other users.
Author (slug: ‘author’) – somebody who can
publish and manage their own posts.
Contributor (slug: ‘contributor’) – somebody who can write and manage their own posts but cannot publish them.
Subscriber (slug: ‘subscriber’) – somebody who can only manage their profile.
In wp-admin/options-general.php page it says:
New User Default Role Subscriber.
In wp-admin/options-general.php?page=bbpress it says:
Automatically give registered visitors the Participant forum role.
I am assuming that if I signup using wp-login.php?action=register then I am signing up as Subscriber
I am also assuming that if I signup using a page that use [bbp-register] shortcode then I am signing up as Participant.
This seems inconsistent to me.
Is there any way, when a user registers, he will be both a Subscriber and a Participant.
You need to hook action on user_register to add second role automatically:
add_action('user_register', 'user_register_participant', 10, 1);
function user_register_participant($user_id)
{
$u = get_user_by('ID', $user_id);
$u->add_role('participant');
}
Put that code in the end of functions.php file of your theme, and this should do the trick.
UPD: use wp-login.php?action=register for registering users henceforth.
I have an admin user, and a contributor user.
Now when the contributor makes a new page it gets sent for approval by the administrator user. This is good , however i want this same ability but for when editing pages.
So if a contributor edits any page, the changes have to be approved by an administrator.
I do not know how to achieve this, I am using the User Role Editor Plugin but can still not get this to work.
Does any one know how i can implement this?
According to the codex, a contributor is somebody who can write and manage their own posts but cannot publish them. I'm assuming your contributor is editing posts that have already been published? All you need to do is set them to draft and publish them again once you're happy with the edits.
I have a Wordpress site that the client wants to set a couple of users up on, purely for creating, editing and deleting blogs. They want to assign these users the 'author' role and when they log into the admin area, they only want them to see the post type 'posts'. They do not want them to have access to media or any other custom post types. Does anyone have any ideas on this please?
User Role Editor plugin (https://wordpress.org/plugins/user-role-editor/) has always served me well in cases like that.
As the description says: User Role Editor WordPress plugin makes user roles and capabilities changing easy. Edit/add/delete WordPress user roles and capabilities.
Sounds like the Groups plugin is what you're looking for here. I don't think that functionality is possible within stock Wordpress.
This allows you to further segregate users and permissions, restricting to posts, etc.
Dear friends i'm doing Bsc final for my final year project i have choose Drupal site to build the shopping cards website. I have lots of question to complete my part of the project. unfortunately i could not put my all questions at same page.
How would you grant a particular permission to a particular user?
An individual user or a user role?
To set user role permissions you need to go to the permissions page under 'people' in the admin menu. Or if you are logged in as admin, just stick this on the end of your url /users/admin#overlay=admin/people/permissions
django 1.5.1
django cms 2.4.2
i am just learning django-cms and am working on my first test site. I searched this site and googled for these questions but can't find any answers which is why I am posting here.... Any help would be appreciated!
Through the admin page (as superuser) i added a group with permission to add/change/delete pages in addition to other permissions.
I create a user and assign the user to this group.
First of all, if i don't specify that user as staff then they can't access the admin site to login to begin with - this just doesn't make sense to me: what's the point of a user who never has the option to log in? Or is there something I'm missing - is there another way to log in besides the admin site itself.
Second, after marking that user as staff, and keeping in mind that the user is a member of group with permission to add/edit/delete pages, when the user logs in he can perform other admin tasks that he was given permissions for but still can't add/edit/delete pages. Although pages shows up as an object there is no link to the page list.
The Staff setting is to differentiate between users who are allowed to access the Django admin and users who aren't i.e. regular users who have signed up to your website via a registration form.
I had the same problem as you creating a new non-superuser user and not being able to add or edit pages as that user. It turned out that I needed to set CMS_PERMISSION = False in my settings.py.
If CMS_PERMISSION == True, you get a more fine-grained permissions framework where each page has its own list of users who are allowed to view and edit it, so permission to edit is done on a page-by-page basis (unless you're a superuser). If you don't need that functionality, I suggest you turn it off.
If you do want the more fine-grained permissions system, but you also want some users to be able to edit any page on the site, log in to django admin as a superuser and look at Cms -> Pages global permissions. From there you can give blanket edit rights to any user or group.