-
Notifications
You must be signed in to change notification settings - Fork 17
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 readonly mode #406
add readonly mode #406
Conversation
tested with create spaces/datasets/files but might be missing special cases. fixes #405
tested this, was able to create a dataset using Create Dataset button on the explore page when logged in as user with status set to ReadOnly ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still some buttons on Explore UI that allow creation of new resources.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found a few more links in a couple of places:
- Dashboard at the top Create Space / Dataset Collection
- Dashboard My Spaces tab and My Collection tab
- Profile page, Spaces and Collections tabs (might be same template as dashboard)
- Selections, Delete All / Tag all
Left two other comments inline.
app/api/ApiController.scala
Outdated
case Some(resource) if Permission.checkOwner(u, resource) => block(userRequest) | ||
case _ => Future.successful(Unauthorized("Not authorized")) | ||
} | ||
if(u.status == UserStatus.ReadOnly && !api.Permission.READONLY.contains(permission)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to add this logic to controllers.SecuredController.PermissionAction
to lock pages like /datasets/new
tested with create spaces/datasets/files but might be missing special cases. fixes #405
Description
A request was made to be able to mark users as read-only. They should not be able to create new spaces, or anything else. All they can do is view things.
Use 2 users, an admin user and set the second user to readonly
See if the readonly user can do any write operations, create spaces/datasets/collections/files/tags/comments etc.
Review Time Estimate
Types of changes
Checklist: