c2siorg / Codelabz

Codelabz
Apache License 2.0
11 stars 51 forks source link

[ Fix : Implemented The Option to Add&Remove Editor (1), Admins (2), Reviewers (0) to Organization ] #77

Open rohitPandey469 opened 6 months ago

rohitPandey469 commented 6 months ago

Description

The OrgUsersCard wasn't using the addOrgUserModal which is already present, so I fixed it by opening the addOrgUserModal on clicking the + Add New button, afterwards when the Modal is opened, it shows list of all the users having access to the organization including the option to search an organization user and remove lower leveled permission users. And the modal has a +Add New button as well which adds users to that organization. Now when a tutorial is created by a user in an organization then all other users present in that org. have access to edit it.

Related Issue

Fixes #76

Motivation and Context

Adding an option to add and remove users in an organization with permission.

How Has This Been Tested?

Tested locally on my machine.

Video reference:

What I am doing here? Logged in through Sarfraz id and Rohit id ( org. for this is created by me manually - the org. creation issue is solved in another PR ) then in the youtube org. of Sarfraz ( whose access only sarfraz have ) chose rohithandle as the Admin of the youtube ( permission level 2 ), now tutorial created inside youtube can be edited by both the users.

https://github.com/c2siorg/Codelabz/assets/123815256/9c7c240b-3259-4ecb-90a1-375e529656ec

Here shown some more glimpse of it, actually it was already implemented or present in the code I just connected everything and fixed something to make it work.

https://github.com/c2siorg/Codelabz/assets/123815256/215c09b9-a9e5-4d76-87f2-64558df4b62f

Types of changes

Checklist:

Note:

  1. I have used the already present code in orgUserCard and connected it - might be that it wasn't connected or left and no one noticed cause in previous PR's the guy created a new modal to do the same work.
  2. Adding the users with permission level. So, will use it further to allow edit. ( like Reviewer can't edit or something )
  3. I tried to copy file changes from PR this https://github.com/scorelab/Codelabz/issues/1036 but it's not working, so I created the org. manually through firebase for rohithandle. ( I dunno one of the guy was saying that it's fixed - well it's not )