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

Force required permissions in jsf pages #1456

Closed
yurem opened this issue Jan 4, 2019 · 2 comments

Comments

@yurem
Copy link
Contributor

commented Jan 4, 2019

Right now html pages has action like this:
<f:viewAction action="#{permissionService.hasPermission(target, action)}"/>

But this method returns true/false only. We need to add new method requestPermission to permissionService which should throw SecurityEvaluationException when EL expression return false.

Also after that we need to do global replace in all xhtml: permissionService.hasPermission -> permissionService.requestPermission

@yurem yurem added the bug label Jan 4, 2019

@yurem yurem added this to the 4.0 milestone Jan 4, 2019

@yurem yurem modified the milestones: 4.0, 3.1.6 Jan 23, 2019

@syntrydy

This comment has been minimized.

Copy link
Collaborator

commented Jan 29, 2019

@yurem when i check few xhtml pages there is call for <f:viewAction action="#{permissionService.hasPermission(target, action)}"/> in them. However that method is call from the leftmenu.xhtml page here https://github.com/GluuFederation/oxTrust/blob/master/server/src/main/webapp/WEB-INF/incl/layout/leftmenu.xhtml#L46.
When you say ....should throw SecurityEvaluationException when EL expression return false., Which EL expression?

@yurem

This comment has been minimized.

Copy link
Contributor Author

commented Jan 30, 2019

This line we should not change because here we prepare value for rendered attribute

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.