-
-
Notifications
You must be signed in to change notification settings - Fork 995
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API: Fix the usage of userType #1711
Comments
Would like to work on this issue. |
1 similar comment
Would like to work on this issue. |
I would like to work on this issue |
Can i work on this? |
@KoraboinaSankeerth You requested this in both the api & admin repos. Since you had no issues, I did give you both. These are both noted as urgent issues, so if having both will slow down the resolution, please unassign yourself from one, so we can make sure this gets addressed as fast as possible. Thank you! |
Hey @palisadoes if the admin is going to per organisation then I think there is no purpose of user type field as we already have adminfor field in the user schema which contain the list of organisation in which user is admin ,we can directly check from it . Instead of user type field we can have Is_Super_Admin field |
Other challenges to consider:
How would can we best achieve all these goals? |
How will the user would get userType =Non_user as the user registering through mobile app and web portal will get userType=user by default? |
In at least these circumstances:
Both these features are planned to be added soon. |
I should remind that this suggestion was made considering the approach used in that PR(adding NON_USER variant to userType), it's not a bulletproof suggestion. |
@xoldyckk Even so, the points need to be considered in the PR for this issue for their applicability. |
ok then we can go with the userType field but I think we can have separate model for the non-users as temp user with basic fields of the user and as we already have the field adminFor which contain the list of organization for which the user is admin so I think there is no need to specify user as admin in a different field .This could solve the problem of confusion between admin and superadmin |
when the non user would become user then we can migrate data to User model |
with this we can easily provide admin right only to user as we would querying on User model only and Non User would be stored in different model |
|
Yes this approach of having an AppUser object and generic User object is good we can implement it |
Unassigning due to no PR activity or assignee comments in the past 10 days |
Can I work on this issue ,although I am already assigned with two issues but the one in mobile repo is ready to be merged |
Hey can I work on this ? |
I would like to work on this |
I would love to work on this issue. Thanks. |
I assigned this to the first person on the list with less than 2 issues. I appreciate that sometimes issues have PRs close to merging, but it becomes too much for us to manage and track without strictly following the 2 issues rules. Thank you for understanding this policy. |
ok sir |
Rename @xoldyckk any thoughts? |
@AVtheking Please proceed. The solution was mostly agreed upon in that referenced issue. The fields with the suggested modifications will meet our needs. |
Ok sir |
@palisadoes sir should I deprecate the updateUserType mutation as there will be no userType field in the User model ,or modify it to make the user superUser? |
One more thing @palisadoes sir in organization model should I change the admin field refrence to AppUserProfile or it is okay to be refrenced to the User ? |
User |
what about this sir ? |
Yes |
Remember that you'll need to update:
|
Ok sir |
MemberDetail
Screen in the develop-userTypeFix
branch
PalisadoesFoundation/talawa-admin#1682
Describe the bug
userType
by organization.userType
is currently a part of theUser
definition not part of auserOrganization
definition or something similar.Admin
is anAdmin
for all organizations which grants the same rights as aSuperAdmin
. This is not the intention.Admin
andSuperAdmin
roles.This needs to be resolved as it is a showstopper bug.
Expected behavior
These conditions must apply:
userType
must be applied per person per organization.SuperAdmin
must be aSuperAdmin
for all organizationsuserType
s would be on a per organization basisThis means that all code logic referencing the
userType
will need to be updated accordingly.TALAWA API
Additional considerations include:
userType
USER
if not done so alreadyTALAWA ADMIN
Additional considerations include:
TALAWA MOBILE
No expected changes as userType isn't referenced in the code base
Actual behavior
userType
by organization.Screenshots
The current schema:
Additional details
Related issues:
Potential internship candidates
Please read this if you are planning to apply for a Palisadoes Foundation internship
The text was updated successfully, but these errors were encountered: