Try ERPNext Try Frappe Cloud Buy Support Partners Foundation

The user can see ALL projects, he should only see the projects assigned to him.

Below is the scenario that I have and tried,

  1. I created two projects, Test Project 1 and Test Project 2.

  2. I have 1 Project Manager, 2 Developers and 1 QA who would be working only on Test Project 1.

  3. I have created their users in ERPNext as System Users and have given them the below roles,
    a. Project Manager > Project Manager
    b. Developer > Projects User
    c. QA > Projects User

  4. Then, I assigned the Project Manager, Developers and QAs to only Test Project 1 by using the “Assign to” option in the Project.

  5. But, when I login with any user (i.e. project manager or developer or QA), I can see all the projects (i.e. ones that are not assigned to them as well).
    The expected behavior here is to see only projects that are assigned to that user (in this case only Test Project 1).
    So, I am unable to restrict users to view assigned projects only.
    Can someone please help/suggest what more needs to be done so that I can restrict my users to see only the projects that are assigned to them?

1 Like

@ashwinimastud You can use User Permission doctype for the same.
Select the user, Project in allow field and project name in for value field.

Hi @kartik ,
Thanks for your suggestion. We have already tried this option, but it won’t be feasible in a scenario where I have (for example) 10 - 15 projects and 100+ member team (mix of Project Managers, BAs, TLs, Developers, QAs, etc…).
Assigning projects to team members and then managing them this way will become a little tedious and cumbersome process in the long run where projects and team will constantly change and increase/decrease.
Is there any other easy and straight forward way to assign projects to the users and manage these assignments?
And, any idea why the Assigned To field does not do this? I mean it allows assigning users but does not restrict the users to view only the projects assigned to him?

Try this.
Remove permissions for Project doctype from the role assigned to these users. And then they should be able to see only the assigned projects.

I tried removing the permissions for Project doctype and it worked for projects. Now the user can see and access only the projects assigned to him. Thanks for the suggestion.

But came across another issue where, there are different Kanban Boards created for the different projects and if the user selects another project from the Kanban Board view (using the filter section), then the user can access/edit tasks from other projects which are not assigned to him.

For example, only Test Project 1 is assigned to user: anna.sthesia@gmail.com but she is able select Test Project 2 from Kanban board view as shown in the below screenshot,

Thanks!

Also I was thinking, can we create a new permission as “List” for project user (say for developers) where user can see list of all projects and tasks but able to access/edit only assigned projects or tasks?

Or any other alternative way to achieve this if adding a new permission is not possible.

Thanks!

Try the sharing option instead and see if that works out:

https://docs.erpnext.com/docs/user/manual/en/setting-up/users-and-permissions/sharing

Hi @kennethsequeira , I tried “Shared with” option to restrict user to access/edit tasks from other projects which are not assigned to him but it didn’t worked and the user can still access and edit tasks which are not assigned to him.
Any idea why the Shared with option does not restrict users from accessing documents which are not assigned to him?

Also the Assigned To field does not restrict users from accessing documents which are not assigned to him.
Just curious to know and understand why and how would someone use Assigned To and Share options?
Thank you!