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

permissions: refactoring organisation permissions #1051

Merged
merged 1 commit into from
Jul 20, 2020

Conversation

zannkukai
Copy link
Contributor

  • Refactoring the permissions process using a permission factory and
    permission classes for any resource instead of resources shared
    functions. This way is the same way used by SONAR & Zenodo project
  • Creates permission factory method
  • Creates basic permission classes
  • Create Organisation permission class
  • Fixes unitests

Co-Authored-by: Renaud Michotte renaud.michotte@gmail.com

How to test?

  • poetry run ./run-tests.sh

Code review check list

  • Commit message template compliance.
  • Commit message without typos.
  • File names.
  • Functions names.
  • Functions docstrings.
  • Unnecessary commited files?
  • Extracted translations?

@zannkukai zannkukai added the f: permissions Concerns the rights management label Jun 18, 2020
@zannkukai zannkukai self-assigned this Jun 18, 2020
@zannkukai zannkukai force-pushed the zan-permissions-refactoring branch from 1f4bd67 to 312bcf6 Compare June 18, 2020 14:08
@zannkukai zannkukai marked this pull request as ready for review June 18, 2020 14:18
@zannkukai zannkukai marked this pull request as draft June 18, 2020 14:19
@zannkukai zannkukai force-pushed the zan-permissions-refactoring branch 3 times, most recently from 809ef1c to 9be0bc5 Compare June 18, 2020 15:42
@zannkukai zannkukai marked this pull request as ready for review June 18, 2020 16:10
@zannkukai zannkukai marked this pull request as draft June 18, 2020 16:32
@zannkukai zannkukai force-pushed the zan-permissions-refactoring branch 10 times, most recently from 29ad8e7 to 36597b7 Compare June 23, 2020 14:58
@zannkukai zannkukai marked this pull request as ready for review June 23, 2020 15:00
@zannkukai zannkukai marked this pull request as draft June 23, 2020 15:31
@zannkukai zannkukai changed the base branch from dev to master June 23, 2020 15:31
@zannkukai zannkukai changed the base branch from master to dev June 23, 2020 15:32
@zannkukai zannkukai force-pushed the zan-permissions-refactoring branch from 36597b7 to d8cf6eb Compare June 23, 2020 15:33
@zannkukai zannkukai marked this pull request as ready for review June 23, 2020 16:46
@zannkukai zannkukai requested a review from rerowep June 23, 2020 16:46
@zannkukai zannkukai force-pushed the zan-permissions-refactoring branch from d8cf6eb to eeb3582 Compare June 24, 2020 11:22
@zannkukai zannkukai force-pushed the zan-permissions-refactoring branch 2 times, most recently from 30cf430 to 3c96dbc Compare July 1, 2020 07:32
@zannkukai zannkukai force-pushed the zan-permissions-refactoring branch from 3c96dbc to 921bcf2 Compare July 3, 2020 07:57
Copy link

@iGormilhit iGormilhit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit message approved.

Copy link
Contributor

@jma jma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small comments. Thanks for this good job!

rero_ils/modules/organisations/api.py Show resolved Hide resolved
rero_ils/modules/organisations/api.py Outdated Show resolved Hide resolved
rero_ils/modules/organisations/api.py Show resolved Hide resolved
rero_ils/modules/organisations/api.py Show resolved Hide resolved

:param user: Logged user.
:param record: Record to check.
:returns: True is action can be done.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rename returns to return and check it on the entire project. Thanks.

@iGormilhit iGormilhit added this to the v0.11.0 milestone Jul 14, 2020
@zannkukai zannkukai force-pushed the zan-permissions-refactoring branch from 921bcf2 to 4c7ee14 Compare July 19, 2020 09:52
* Refactoring the permissions process using a permission factory and
permission classes for any resource instead of resources shared
functions. This way is the same way used by SONAR & Zenodo project.
* Creates permission factory method.
* Creates basic permission classes.
* Create Organisation permission class.
* Fixes unitests.

Co-Authored-by: Renaud Michotte <renaud.michotte@gmail.com>
@zannkukai zannkukai force-pushed the zan-permissions-refactoring branch from 4c7ee14 to 415265d Compare July 20, 2020 07:30
@zannkukai zannkukai removed this from the v0.11.0 milestone Jul 20, 2020
@zannkukai zannkukai merged commit cdf6c67 into rero:dev Jul 20, 2020
@zannkukai zannkukai deleted the zan-permissions-refactoring branch July 22, 2020 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
f: permissions Concerns the rights management
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants