Prevent clients (or other users) from changing document statuses

Project Panorama is a WordPress Project Management Plugin that will have you loving your job again!

Want to prevent certain users from updating document statuses? This can be done with a simple copying and pasting of code!

Geeky bits ahead, if you’re just looking to prevent subscribers/clients from changing status jump to the next section.

User Role CSS Classes

Panorama automatically adds the current logged in users role to the body, i.e. if I’m logged in as an administrator the document body will have a class of “role-administrator.”

We can use this to control what users can do in certain places, so if you’re referencing Panorama’s built-in roles we’ll have the following classes to work with:

  • role-administrator
  • role-project-manager
  • role-project-owner
  • role-project-creator
  • role-subscriber

Now we can disable the ability to interact or change the status of a document by using the CSS selector

pointer-events: none;

This tells the users browser that they can’t interact with the element including clicking or hovering.

Prevent Clients for Changing Document Status

So if we want to prevent clients from changing document status, we can just copy and paste the following into Projects > Settings > Appearance > Custom Styling.

You can adjust this to add which ever user roles you’d like to include with clients:

#psp-projects.role-subscriber a.doc-status {
     pointer-events: none !important;
}

That’s it! You’re done!

Back to school sale, ends soon!
Stay Connected Sale – 50% off
+