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

CODENVY-1711: Grant permissions to admins for predefined stacks #1768

Merged
merged 2 commits into from
Feb 20, 2017

Conversation

mmorhun
Copy link
Contributor

@mmorhun mmorhun commented Feb 13, 2017

What does this PR do?

Allows to users with manageSystem permission perform edit and delete operation with predefined (i.e. public for all users) stack.

What issues does this PR fix or reference?

#1711

Changelog

Permissions granted to admins to perform update and delete action with predefined stacks.

Release Notes

Added ability to admins with manageSystem permission perform update and delete action with predefined stacks.

Docs PR

N/A

@@ -86,8 +103,66 @@ public void filter(GenericResourceMethod genericResourceMethod, Object[] argumen
throw new ForbiddenException("The user does not have permission to perform this operation");
}

if (currentSubject.hasPermission(SystemDomain.DOMAIN_ID, stackId, SystemDomain.MANAGE_SYSTEM_ACTION)
Copy link
Contributor

Choose a reason for hiding this comment

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

currentSubject.hasPermission(SystemDomain.DOMAIN_ID, null, SystemDomain.MANAGE_SYSTEM_ACTION)

return permissionsManager.getByInstance(DOMAIN_ID, stackId, 25, 0);
}
if (!permissionsPage.hasNextPage()) {
return null;
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think that it is good idea to return null here

…te and delete to predefined stacks

Signed-off-by: Mykola Morhun <mmorhun@codenvy.com>
@mmorhun
Copy link
Contributor Author

mmorhun commented Feb 15, 2017

ci-build

@sleshchenko
Copy link
Contributor

Add yourself as author to StackPermissionsFilter please

Signed-off-by: Mykola Morhun <mmorhun@codenvy.com>
@bmicklea
Copy link
Contributor

These will appear in Swagger docs, right?

@mmorhun
Copy link
Contributor Author

mmorhun commented Feb 17, 2017

@bmicklea no, it will just perform action instead of error with permission denied message in case of predefined stack.

@vkuznyetsov vkuznyetsov added this to the 5.4.0 milestone Feb 20, 2017
@mmorhun mmorhun merged commit d7468d8 into master Feb 20, 2017
@mmorhun mmorhun deleted the CODENVY-1711 branch February 20, 2017 09:40
@JamesDrummond JamesDrummond mentioned this pull request Mar 8, 2017
8 tasks
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

5 participants