Skip to content

Content libraries permissions - #8

Closed
bradenmacdonald wants to merge 2 commits into
content-libraries-prototypefrom
content-libraries-permissions
Closed

Content libraries permissions#8
bradenmacdonald wants to merge 2 commits into
content-libraries-prototypefrom
content-libraries-permissions

Conversation

@bradenmacdonald

Copy link
Copy Markdown
Member

This pull request implements more fine-grained permissions for content libraries.

There are three roles that users can have:

  • Instructor ("Instructor" in LMS, "Admin" in studio): Can edit the library and its content, and can assign roles to other users.
  • Staff: Can edit the library and its content.
  • LibraryUser: New permission: read-only access to the library. Can use its content in other courses (and override settings when doing so), but cannot make any changes to the library itself nor its content.

No UI has yet been implemented for assigning these roles to users, but you can see the tests for how to do it from code. You can also test it out by assigning roles manually - just ensure the django admin site is enabled, then go to http://localhost:8001/admin/student/courseaccessrole/ and create entries with role of library_user or staff or instructor and course equal to the library's key.

Note: The permissions are currently not checked when the refresh_children method of LibraryContentModule does its thing. This will be implemented after the Scope.settings stuff is figured out (see #6), since it involved re-writing refresh_children.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Could be written as OrgLibraryUserRole(org=course_key.org).has_user(user) or LibraryUserRole(course_key.for_branch(None)).has_user(user)

@e-kolpakov

Copy link
Copy Markdown

Looks good, the only thing I'm concerned about is the fact hat there are some changes that might conflict with paging effort, but that's not something you could fix until you have my paging code :).

Admin ("Instructor") - Can edit and assign permissions to other users
Normal ("Staff") - Can edit
User - Can view the library and use content from it but cannot edit it or its blocks.
@bradenmacdonald
bradenmacdonald force-pushed the content-libraries-prototype branch from 3e44683 to 1c5c007 Compare November 14, 2014 05:36
@bradenmacdonald
bradenmacdonald force-pushed the content-libraries-permissions branch from acbaddb to 9edecd1 Compare November 14, 2014 05:36
@bradenmacdonald

Copy link
Copy Markdown
Member Author

Closing. The latest code for library permissions is in content_libraries/5-permissions and is waiting for upstream PRs to be merged before we can open a new upstream PR to merge it into the content-libraries feature branch.

@bradenmacdonald
bradenmacdonald deleted the content-libraries-permissions branch November 28, 2014 03:31
itsjeyd pushed a commit that referenced this pull request Nov 30, 2016
Adds update_anonymous_user_ids management command
pomegranited added a commit that referenced this pull request Oct 3, 2018
pomegranited pushed a commit that referenced this pull request Jun 26, 2019
Fix username hints for SSO
DanielVZ96 pushed a commit that referenced this pull request Jan 31, 2024
This custom image includes the elasticsearch-head plugin

Fixes #8
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.

2 participants