User permissions?

This topic contains 15 reply and 4 voices, and was last updated by theoryengineers 11 years, 6 months ago
Viewing 15 Posts - 1 through 15 (of 15 total)
Author Posts
March 2, 2013 at 5:49 pm 1200
theoryengineers Hi guys, I have this plugin set up for a building contractor, he wants to use this tool to inform his clients about building schematics, pictures when to do some tasks etc. and keep all email traffic on site with the Project Manager. How it's now setup, everyone can delete or add projects etc. no matter what the user role is set to. I would like to know if it's possible to assign some permissions to normal users so that they can't add new tasks, milestones, delete project, delete task, delete task list, delete messages, make new task lists etc. But can: Add a new message, a new reaction, upload a file, check on or off on the task-list, check on or off on the milestone page.
March 2, 2013 at 5:58 pm 1202
Tareq Hasan Tareq Hasan

That shouldn’t be the case. It DOES checks some permissions.

  • Admin and Editors can delete/create/see all the projects.
  • Other user can see only their project they are assigned to. Can’t create too.
  • delete_pages” permission is checked to determine the user level.

Perhaps you altered some default WP permission levels? Please install the plugin in a clean WP installation and see if these problems are still there.

March 2, 2013 at 6:23 pm 1204
eskamedia eskamedia

I had the developer plugin installed, but I just un-installed that to see if that would change things.
I even tried on a fresh install most of the permissions stay the same.

I’m logged in as a normal user on the project manager, but i still can remove messages in my current setup (i cant remove a message in fresh install), make new task lists add new milestones etc. remove milestones etc.

It would do me good if those permissions could be denied for a normal user.

March 2, 2013 at 6:50 pm 1205
Tareq Hasan Tareq Hasan

Yes, you are right. In some cases, like task list, to-do, milestones, the user role wasn’t checked. May be it needs some more user level restriction.

March 2, 2013 at 6:52 pm 1206
eskamedia eskamedia

Is that something i can do on my own?

March 2, 2013 at 6:58 pm 1207
Tareq Hasan Tareq Hasan

Yes you could, check the user roles and capability. You could check the roles with current_user_can('CAPABILITY NAME') and restrict the edit/delete links.

March 3, 2013 at 11:20 am 1212
eskamedia eskamedia

I tried to look into it but it’s out of my league. I looked in capabilities.php and functions.php but did not find anything that resembled current_user_can

I found allot of articles on how to change a role, but not where to look!
Could you give some more pointers please?

March 3, 2013 at 11:39 am 1213
eskamedia eskamedia

Ah i see the current_user_can in single.php Ok now what?

March 3, 2013 at 11:42 am 1214
Tareq Hasan Tareq Hasan

Did you take a look at here?

March 3, 2013 at 12:08 pm 1215
eskamedia eskamedia

Ok, in views/task in index.php i’ve added this

<h3 class=”cpm-nav-title”>
<?php _e( ‘Task Lists’, ‘cpm’ ) ?>

<?php if ( current_user_can( ‘??????’ ) ) { //editor ?>
<a id=”cpm-add-tasklist” href=”#” class=”add-new-h2″><?php _e( ‘Add New Task List’, ‘cpm’ ) ?></a>
<?php } ?>
</h3>

But what capability do i put in where the ‘?’ are so that it will remove the option to add a new task-list for subscriber?

March 3, 2013 at 12:12 pm 1216
eskamedia eskamedia

Ah i just put <?php if ( current_user_can( ‘delete_others_posts’ ) ) { //editor ?> and it does not show anymore to a subscriber!

March 3, 2013 at 12:39 pm 1217
eskamedia eskamedia

Great! It worked, i’ve added that line to all the delete/edit links in html.php

Thanks for your help

May 16, 2013 at 10:13 pm 3732
Sebastian Sebastian

Could you explain a little more for dummies as is the process?

May 17, 2013 at 5:34 am 3745
theoryengineers theoryengineers

Yes.

Is there some way to limit certain functions by user type?

I’d like it to be an “open” project management software because the community enjoys helping out.

If we can get some user permissions or more details on how to put user permissions in, then that would make this great.

I got the frontend version:D

May 17, 2013 at 11:34 am 3751
Tareq Hasan Tareq Hasan

Right now, WP Project Manager doesn’t maintain that much permission restriction. So it’s tough to maintain.

May 17, 2013 at 11:03 pm 3805
theoryengineers theoryengineers

Can you explain how to manually do it?

I’d like my users to view the list and make comments, but they can delete and edit everything.

There has to be a simple way to remove the ability to edit and delete tasks, milestones, etc.

Viewing 15 Posts - 1 through 15 (of 15 total)