shiro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ghislain Touratier (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SHIRO-433) Add JSF EL Functions
Date Mon, 06 May 2013 18:56:15 GMT

    [ https://issues.apache.org/jira/browse/SHIRO-433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13649983#comment-13649983
] 

Ghislain Touratier commented on SHIRO-433:
------------------------------------------

Some comments about the patch:
- It may be not necessary to check on nullity of subject returned by SecurityUtils. As from
doc, this method does never (and effectively cannot) return null.
- For the hasAllPermissions method, rather use "subject.isPermittedAll(String... permissions)"
directly instead of iterating manually, moreover it will skip all authorization tests in case
current subject has no principal.
- For the hasAllRoles method, the arguments are not splitted correctly (second parameter of
splitToSet is for delimiter),
	it should be: 
		StringUtils.splitToSet( commaDelimitedRoleNames, String.valueOf( StringUtils.DEFAULT_DELIMITER_CHAR
) );
	instead of:
		StringUtils.splitToSet( commaDelimitedRoleNames, String.valueOf( StringUtils.DEFAULT_QUOTE_CHAR
) );
	(by the way it's a bit confusing that this method takes a String delimiter argument, but
only use the first char)
- Maybe rename functions for consistency with Subject API: all permission tests beginning
with "is" instead of "has", etc. (the same "issue" also appears on JSF tags).

                
> Add JSF EL Functions
> --------------------
>
>                 Key: SHIRO-433
>                 URL: https://issues.apache.org/jira/browse/SHIRO-433
>             Project: Shiro
>          Issue Type: New Feature
>    Affects Versions: 1.3.0
>         Environment: JSF 2.0 EL Functions
>            Reporter: Thorsten Kunz
>              Labels: patch
>         Attachments: el-functions.patch
>
>
> The attached patch will provide common Shiro functions as EL functions that can be used
within JSF components (e.g. in the "rendered" attribute).
> It provides about the same functionality as the recently merged JSF tags but this time
as EL functions that are sometimes more convenient to use than the tags.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message