Replies: 18 comments 19 replies
-
we can control few features from frontend like managing users and providing access to edit projects through buttons which would only be available for roles upto project manager. |
Beta Was this translation helpful? Give feedback.
-
There is already an existing issue for discussing user roles and permissions. |
Beta Was this translation helpful? Give feedback.
-
I think the proposed permission levels are good. AuthenticationRelated to this we need to consider a proper authentication mechanism. Current
Future Requirements
AuthorisationOnce the user is authenticated, we can gather their authorisation details. Database Structue
FastAPI (Backend) Implementation
Frontend
I will update this comment as needed |
Beta Was this translation helpful? Give feedback.
-
Currently we have
Associated Project AdminAs for the Associate Project Admin, is that what we decided on finally? Read OnlyTM has a READ_ONLY role, for users that are blocked for example. I think we should use it too. |
Beta Was this translation helpful? Give feedback.
-
I made a start here: #1094 This show one way we could implement the roles, giving us a base to develop further and discuss in our next team meeting. |
Beta Was this translation helpful? Give feedback.
-
I'm hoping we can get by with simple roles and a hierarchy. If we need more fine grained permission control for roles, we could do something like this: https://itnext.io/fastapi-jwt-authentication-with-scope-permissions-per-route-a42457fc85ca |
Beta Was this translation helpful? Give feedback.
-
A quick question as @spwoodcock mentioned a roles hierarchy: |
Beta Was this translation helpful? Give feedback.
-
Extra infoSuper admin vs web admin
Organization admin flow
Project editing
Project creation (org admin vs project manager)
|
Beta Was this translation helpful? Give feedback.
-
Prompt that we need to discuss the OSM vs regular users
Possible Idea
@susmina94 @manjitapandey @robsavoye @nrjadkry @Sujanadh @varun2948 @NSUWAL123 Edit: scratch the idea of removing the mapper role, as we need it for private projects still... |
Beta Was this translation helpful? Give feedback.
-
Here's another thought on roles. TM has been incorporating OSM Teams, and teams have roles in projects different than users. I doubt FMTM mappers would use OSM Teams to be honest, however, I do see possible field mapping teams. We already see this, often a few mappers will map a task together for mutual tech support after training. I could see FMTM teams that have little to do with OSM teams. So in TM, their are team roles, and user roles, and they are different, although I'd like to merge them into a single Roles Enum. I think of this, cause right now I'm working on project & team support in tm-admin. Do we think in the future we'll want FMTM field teams ? If so, we need to sort out the roles between TM and FMTM to be consistent. |
Beta Was this translation helpful? Give feedback.
-
I agree with needing the teams on FMTM for future. Since for private projects, it would be so easier for project managers to assign a team rather than assigning each individuals everytime. |
Beta Was this translation helpful? Give feedback.
-
The distinction here is public and private projects. Teams would be useful for private project for sure. Perhaps there could also be a team of validators assigned to public projects too? Our dilemma is how can we not require login for private projects, if the mappers for example works for a census bureau and is not an OSM user, but the data still needs to be private? Should we enforce OSM registration for private projects to make our lives easier and their lives more difficult? If we don't want to do this, the only solution I can see to this for now is to provide other login methods:
Edit: considering this more, is signing up to OSM any worse than signing up to another platform? I don't see it as much of a barrier & worth the technical loopholes required to bypass. If the project is private, I think we should enforce OSM login personally. This might encourage orgs to create more public projects anyway (if the mapping process is easier) |
Beta Was this translation helpful? Give feedback.
-
Update to the above comment: we already decided to go ahead with optional email based sign up (+osm) in other threads - I forgot to update the discussion here 👍 The rationale was exactly as Rob is saying, that OSM is a barrier to some. Many mapping communities are entirely outside OSM, but are very competent and want to use FMTM. |
Beta Was this translation helpful? Give feedback.
-
Based on in person discussion with the team, this is the current structure of roles on FMTM: User Specific RolesDefined in the db under
Organisation RolesDefined in the db under Project Specific RolesDefined in the db under
Incorporating Tasking Manager Teams
Mapping Teams
Is this summary correct @susmina94 @manjitapandey feel free to correct me anywhere |
Beta Was this translation helpful? Give feedback.
-
TM has two sets of roles, user roles and team roles. Right now I'm using a jsonb column ie,.. {"team_id": id, "role": FOO} for example. Experience has shown that field mappers often form informal teams. They'll be done training, but then a few people will map together for mutual support. |
Beta Was this translation helpful? Give feedback.
-
Here's a shot at a simple config file to define roles for FMTM. By default, anyone can view any public project. This is a gross simplification of the spreadsheet.
|
Beta Was this translation helpful? Give feedback.
-
I'm not sure is SUPER_ADMIN is really needed, because if you have direct access to the database, you probably have root access anyway, so it's not really needed in FMTM. |
Beta Was this translation helpful? Give feedback.
-
(copied from Slack)
|
Beta Was this translation helpful? Give feedback.
-
As we are in the verge of implementing user roles and permissions in fmtm. This GitHub discussion is an open forum to dive into the world of user role management. Our goal is to collectively refine the roles assigned within the system for optimal efficiency, access control, and collaboration.
User Roles Overview:
Super Admin: Highest level of access and control over the entire system.
Organisation Admin: Manages settings and permissions at the organizational level.
Project Admin: Oversees settings and permissions specific to individual projects.
Associate Project Admin: Assists Project Admins in managing project-specific configurations.
Validator: Responsible for validating and ensuring data accuracy.
Mapper: Focuses on the creation and editing of data within projects.
What are the other possible user roles?
This link has the details of the user roles and permission drafted.
https://docs.google.com/spreadsheets/d/1crWztvXvuewE8Zv-qxbv0t_-eYHUqSlrJQgeto8kmf4/edit#gid=1497569844
Discussion Point
How do we handle the user permissions from the backend, do we maintain a seperate table controlling those user permissions.
Do the backend provide the permissions for controlling the UI elements or it is okay if we control them from the frontend itself.
We should also think about the object level permissions.
Potential Solution 1
We can maintain a table with the permissions added for different roles and same for the object level permission. For example: Whenever a user is assigned to a NAXA organisation as an organisation admin. We store that as a row in the database table.
Beta Was this translation helpful? Give feedback.
All reactions