Skip to content
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

[Backend] Improved Team Management #607

Merged
merged 7 commits into from
Jun 20, 2021

Conversation

amlannandy
Copy link
Collaborator

@amlannandy amlannandy commented Jun 16, 2021

Description

This PR brings a number of improvements to the Teams System in the backend. The detailed changes are listed below commit-wise -

Commit 1

  • Created various access decorators which can be used on routes to restrict who can access it.
  • E.g. Route with @project_owner_only can only be accessed by the creator of a project

Commit 2

  • Added access decorators on appropriate routes
  • Removed redundant code on those routes

Commit 3

  • Created a route for a member to leave a project
  • Added message for this route in the logs decorator

Commit 4

  • Created routes for granting and revoking admin access to users in a project
  • Added messages for both routes in the logs decorator

Commit 5

  • Resolved merge conflicts

Commit 6 & 7

  • Modified get team by id route to also fetch last 5 logs and details of team members for showing in the TeamDetailsScreen in mobile application

Commit 8

  • Created a route to get the roles the current user has in a project
  • This route will help in restricting access in the Mobile Application, regulating which actions the user can perform based on their roles

Fixes #592

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Demo Video has been provided below

Test Configuration:

  • Postman
  • Windows 10

Granting and revoking admin access

make-remove-admin

Leaving a project

leave-project

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@charithccmc charithccmc requested review from carpecodeum, laksh22, hiranthaR, ivantha and ThatUdeshUK and removed request for carpecodeum June 16, 2021 16:03
ThatUdeshUK
ThatUdeshUK previously approved these changes Jun 19, 2021
@ThatUdeshUK
Copy link
Collaborator

@amlannandy can you rebase the branch?

@amlannandy
Copy link
Collaborator Author

@amlannandy can you rebase the branch?

Done

@ThatUdeshUK ThatUdeshUK merged commit 5583c4d into scorelab:master Jun 20, 2021
@amlannandy amlannandy mentioned this pull request Jun 21, 2021
12 tasks
@amlannandy amlannandy deleted the backend-team-management branch June 24, 2021 08:14
@amlannandy amlannandy added backend Issue and PR regarding backend GSoC 2021 Tasks related to GSoC 2021 labels Jul 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Issue and PR regarding backend GSoC 2021 Tasks related to GSoC 2021
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve project team management
2 participants