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

Add module-level permissions and admin management (SHUUP-2703) #549

Merged
merged 4 commits into from
Jun 20, 2016

Conversation

shawnadelic
Copy link
Contributor

@shawnadelic shawnadelic commented Jun 16, 2016

  • Add get_required_permissions for AdminModule
  • Add Permission Groups admin module
  • Add permission groups to Users admin
  • Define permissions for each admin module

Refs SHUUP-2703, SHUUP-2817, SHUUP-2819, SHUUP-2820, SHUUP-2818

@anders-jenkins
Copy link

Refer to this link for build results (access rights to CI server needed):
http://spartacus.aintra:8080//job/shoop-ng-pull-requests/2028/
Test PASSed.


def save(self):
obj = super(PermissionGroupForm, self).save()
obj.permissions.clear()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this is unnecessary

@anders-jenkins
Copy link

Refer to this link for build results (access rights to CI server needed):
http://spartacus.aintra:8080//job/shoop-ng-pull-requests/2033/
Test PASSed.

@shawnadelic shawnadelic force-pushed the add-permissions branch 2 times, most recently from 1f7a4cc to fdf8af3 Compare June 16, 2016 22:57
@anders-jenkins
Copy link

Refer to this link for build results (access rights to CI server needed):
http://spartacus.aintra:8080//job/shoop-ng-pull-requests/2034/
Test PASSed.

@anders-jenkins
Copy link

Refer to this link for build results (access rights to CI server needed):
http://spartacus.aintra:8080//job/shoop-ng-pull-requests/2036/
Test PASSed.

@@ -74,6 +74,7 @@ Localization
Admin
~~~~~

- Define permissions for all admin modules
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you are actually defining module level permissions for all admin modules?

Add support for module-level permissions.

Modules define their own permissions by overriding
`get_required_permissions`, returning a list of permission strings.

If a user doesn't have the required permissions, they will not see
the module's menu entries.

Refs SHUUP-2703, SHUUP-2817
@anders-jenkins
Copy link

Refer to this link for build results (access rights to CI server needed):
http://spartacus.aintra:8080//job/shoop-ng-pull-requests/2051/
Test PASSed.

Shawn Her Many Horses added 3 commits June 20, 2016 12:50
Add Permission Groups module for managing module-level access for staff
users.

Refs SHUUP-2703, SHUUP-2820
Enable adding permission groups from `Users` admin permissions edit
view.

Refs SHUUP-2703, SHUUP-2819
Define permissions for all admin modules by implementing
`get_required_permissions` and defining url-level permissions.

Refs SHUUP-2703, 2818
@anders-jenkins
Copy link

Refer to this link for build results (access rights to CI server needed):
http://spartacus.aintra:8080//job/shoop-ng-pull-requests/2053/
Test FAILed.

@tulimaki
Copy link
Contributor

retest this please

1 similar comment
@tulimaki
Copy link
Contributor

retest this please

@anders-jenkins
Copy link

Refer to this link for build results (access rights to CI server needed):
http://spartacus.aintra:8080//job/shoop-ng-pull-requests/2054/
Test PASSed.

@tulimaki tulimaki merged commit 411fc2a into shuup:master Jun 20, 2016
@anders-jenkins
Copy link

Refer to this link for build results (access rights to CI server needed):
http://spartacus.aintra:8080//job/shoop-ng-pull-requests/2056/
Test PASSed.

@shawnadelic shawnadelic deleted the add-permissions branch June 20, 2016 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants