[ 
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 edited comment on ISIS-886 at 9/26/14 11:52 AM:
-------------------------------------------------------------------

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}

... in which case this can just be a documentation ticket.


was (Author: jcvanderwal):
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:
> {code}
> public String title() {
>     StringBuilder buf = new StringBuilder();
>     if(wrapperFactory.isHidden(this, "firstName")) {
>        buf.append(this.getFirstName());
>     }
>    return buf.toString();
> }
> {code}
> and isDisabled(...) similarly



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to