- August 11, 2015 at 9:43 am #14230
i buyed the pro version of the plugin because i want to use it for a certain task and i need some hints how to accomplish this in the best way.
I use a custom post type called “projects”. Each Project has some meta values, sub-pages and a description.
I need to define a role, which can only access the project it was associated to. That means he/she should not see any other projects in the Admin Panel as well as other options. Only the Project and it’s sub-pages should be visible.
It came to my understanding, that i can limit the access of a role to only one custom type (projects) using the settings and as well limit the write/read access to one single page (for example a certain project) for the role. But if i do that, the user still see’s all other projects and still has the right to edit them. I know that one solution could be to disable the access of the certain role on ALL the other projects, but this is not practicable, since we are talking about 100 projects, which would use 100 roles (one for each project) AND the user still see’s them in his list.
How could i accomplish my task?August 11, 2015 at 9:43 am #14231
Sidenote: https://wpfront.com/wp-admin/post.php?post=14230&action=edit – the edit link generated on the topic page, redirects me to the front page.August 12, 2015 at 6:52 am #14275
What is your criteria for associating a project to a user/role?
From where did you get the above edit link? That is a wp-admin post edit link and users are not allowed to access wp-admin on wpfront.com for security reasons, hence you get redirected to front end.
Sorry for the delayed response, I didn’t get a notification on this topic creation.
SyamAugust 12, 2015 at 8:29 am #14301
thanks for your response.
There is no certain criteria, all the roles are created and associated to a single project manually. It would be very nice to create a role for each project automatically but not really necessary.
The most important thing would be, that the administrator can create a role which has only the rights to 1. Log-In, 2. See the Projects Tab 3. See his single Project and the Subpages and can edit them. It is especially important that he/she can’t see other projects or pages etc.
The link is associated to a “Edit Page” Link which is shown to me on this page as you can see here.August 12, 2015 at 9:11 am #14303
If there is no specific criteria and it has to be set manually then you will have create as many roles based on how many set of permissions you have. For example if half the users get access to same project and half of them don’t then you need two roles. Or if one third of the users get access to Project A, another one third get access to Project B and no one get access to Project C, then you need three roles.
You can set the permission through bulk edit, but you still have to create as many roles against each permission set.
I believe that “Edit Page” link is coming from bbPress and allows you to edit the original topic. I will try to find a way to remove it. For now it will be there but no one will be able to use it. Thanks for reporting it.
SyamAugust 13, 2015 at 8:37 am #14351
i am sorry but i need more specific instructions, because i don’t get how you would work with the 3 roles you mentioned.
A short step-by-step Scenario:
Let’s say i have 99 Posts of the type Projects right now, and…
1. I create a Custom Post of the type Project, namend “Project X”
2. I create a Role named “Project X Administrators”
What do i want to achieve?
– When the User of the Role “Project X Administrators” is in the Dasboard he should see only “Projects” and “Dashboard”
– When the User clicks on “Projects” he should only see “Project X” and Sub-Pages of “Project X”
– The User should be able to edit the Project “Project X” in any way
– The User should not be able to create, edit or see any other pages or projects of the whole system
So, which Attributes should my role have to achieve this? Right now i would activate:
– Dashboard read
– Dasboard edit_dashboard
– Projects edit_projects
But this has the following result:
– The User can see all Projects (but not edit them)
– The User can create Projects
How should i solve this? If i get your solution right i would have to go to ALL of the 99 Projects and disable the access for “Project X Administrators” so only one is left – but this can’t be the best practice way for this case, can it?August 13, 2015 at 6:28 pm #14390
In your scenario, your role need “read” capability and all the capabilities under “Projects” except publish. Now with “edit_projects” capability user will be able to create new Projects, but they won’t be able to publish. They can submit it for review.
Now to give only access to Project X, you will have to use Extended Permissions. Using Bulk Edit remove Read/Edit/Delete permission on all Projects for the role. Then edit Project X enable Read/Edit/Delete for the role.
That configuration should achieve what you are looking for.
Now to give same permission on Project Y, edit extended permission of Project Y. But if you want to give same permission on a different project for different set of users, then you will have to create a new role and repeat the process.
The topic ‘Role for certain page, hide everything else’ is closed to new replies.