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

6290 dataset role mgmt api #6622

Merged
merged 24 commits into from
Feb 13, 2020
Merged

6290 dataset role mgmt api #6622

merged 24 commits into from
Feb 13, 2020

Conversation

sekmiller
Copy link
Contributor

What this PR does / why we need it:
Allows admins to assign roles to users at the dataset level

Which issue(s) this PR closes:

Closes #6290 Dataset Role Management API

Special notes for your reviewer:
None
Suggestions on how to test this:

Does this PR introduce a user interface change?:
None
Is there a release notes update needed for this change?:
No

Additional documentation:

@coveralls
Copy link

coveralls commented Feb 6, 2020

Coverage Status

Coverage decreased (-0.007%) to 19.45% when pulling b7b3645 on 6290-dataset-role-mgmt-api into 251a570 on develop.

Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

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

@sekmiller and I agree that we should also have "revoke role" functionality. He thinks "list" is already there. CRUD, basically.

I also found a tiny bit of English that should go in a bundle.

}
DataverseRole theRole = rolesSvc.findBuiltinRoleByAlias("admin");
if (theRole == null) {
return error(Status.BAD_REQUEST, "Can't find role named '" + ra.getRole() + "' in dataverse " + dataset.getOwner());
Copy link
Member

Choose a reason for hiding this comment

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

I think the new-ish rule is that when we touch APIs we should put the English in a bundle.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added revoke and api messages to the Bundle.

@sekmiller sekmiller assigned pdurbin and unassigned sekmiller Feb 10, 2020
@pdurbin pdurbin removed their assignment Feb 10, 2020
@kcondon kcondon self-assigned this Feb 12, 2020
@kcondon
Copy link
Contributor

kcondon commented Feb 12, 2020

@sekmiller Need GET after -X in list assignments example.

@kcondon
Copy link
Contributor

kcondon commented Feb 12, 2020

@sekmiller Discussed with @scolapasta and @djbrooke , please add inherited as well as directly assigned roles and indicate which is which.

Also can't get role assignment endpoint to work using sample file. Throws error:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>GlassFish Server Open Source Edition  4.1  - Error report</title><style type="text/css"><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 415 - Unsupported Media Type</h1><hr/><p><b>type</b> Status report</p><p><b>message</b>Unsupported Media Type</p><p><b>description</b>The server refused this request because the request entity is in a format not supported by the requested resource for the requested method.</p><hr/><h3>GlassFish Server Open Source Edition  4.1 </h3></body></html>

For the record, I see the same error with the dataverse version of this endpoint. Is the example file incorrect?

@kcondon kcondon assigned sekmiller and unassigned kcondon Feb 12, 2020
@djbrooke
Copy link
Contributor

Thanks @kcondon for the discussion and @sekmiller for taking another pass at this!

@sekmiller sekmiller removed their assignment Feb 13, 2020
@kcondon kcondon self-assigned this Feb 13, 2020
@kcondon kcondon merged commit 28001fb into develop Feb 13, 2020
@kcondon kcondon deleted the 6290-dataset-role-mgmt-api branch February 13, 2020 17:03
@djbrooke djbrooke added this to the 4.20 milestone Feb 13, 2020
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.

Dataset Role Management API
5 participants