Co-manager of a project

Hello,

I wonder how the default permissions for a particular project manager work. Because I want to create new functionality like Co-manager of a project. At the moment of creating a project with let’s say id = 1 by user A, user A gets rights to full access for editing project A and becomes project manager. I do not understand where in code the permissions are given! Suppose that user A is not assigned to any security group.
I already have a field for co-manager and I want to give identical rights to that user (co-manager) like the project manager has.

Thanks.

This depends on so many factors.

Depending on the roles, the user might be getting access to the project by “ownership”, which means, the fact that the Project is “assigned to” him. This doesn’t require a security group in the project.

First, you need to learn about SuiteCRM permissions scheme:
https://docs.suitecrm.com/user/security-suite-groups/

Then check Admin / Security settings for several options governing how permissions are copied from one record to another (on creation, assignment, etc.).

You might need some bit of extra code, or a Workflow, to automatically assign some permissions on some events.

Hello.
So the problem is that I have no idea where in source code should I look (whitch module or file ?), to check how that ownership permissions is getting apied to user.
Could you point me, please?

You don’t need (and shouldn’t) be changing core code.

You can learn on the Developer Guide how to create a relationship (assigning a Security group is creating a relationship to that group)

https://docs.suitecrm.com/developer/working-with-beans/

See the “add” method near the end of that page.

And then you can use a Logic hook to react to some event (record creation, update, etc) and add that relationship.

https://docs.suitecrm.com/developer/logic-hooks/