You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "Jeroen van der Wal (JIRA)" <ji...@apache.org> on 2014/09/26 13:51:34 UTC
[jira] [Commented] (ISIS-886) Provide an API (perhaps in the
WrapperFactory)to allow a programmer to determine whether the current user
has view and/or modify access to a feature.
[ https://issues.apache.org/jira/browse/ISIS-886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14149065#comment-14149065 ]
Jeroen van der Wal commented on ISIS-886:
-----------------------------------------
Might be that this is not needed, could simply wrap the call to the sensitive info:
{code}
public String title() {
StringBuilder buf = new StringBuilder();
try {
buf.append(wrap(this).getFirstName());
} catch(HiddenException ex) {
// ignore
}
{code}
> Provide an API (perhaps in the WrapperFactory)to allow a programmer to determine whether the current user has view and/or modify access to a feature.
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: ISIS-886
> URL: https://issues.apache.org/jira/browse/ISIS-886
> Project: Isis
> Issue Type: New Feature
> Components: Core
> Affects Versions: core-1.6.0
> Reporter: Dan Haywood
> Assignee: Dan Haywood
> Priority: Minor
> Fix For: core-1.7.0
>
>
> The main use case being to allow a suitable title to be rendered (in title()) based on the users' permissions, eg:
> public String title() {
> StringBuilder buf = new StringBuilder();
> if(wrapperFactory.isHidden(this, "firstName")) {
> buf.append(this.getFirstName());
> }
> return buf.toString();
> }
> and isDisabled(...) similarly
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)