cancel
Showing results for 
Search instead for 
Did you mean: 

ReadProperties permission

janejiao
Champ in-the-making
Champ in-the-making
Dear alfresco:
We have a requirement that the ReadProperties permission can't link the file name. Only view the file name;
The Read permission can link and view the file.
so I want to do:

<r:permissionEvaluator value="#{BrowseBean.content}" allow="Read">
     <a:actionLink value="#{r.name}" href="#{r.url}"/>
</r:permissionEvaluator>

<r:permissionEvaluator value="#{BrowseBean.content}" allow="ReadProperties">
     <h:outputText value="#{r.name}" />
</r:permissionEvaluator>


But the above code will apper the <a:actionLink> and <hSmiley SurprisedutputText> at the same time. Can you help me?
Thank you very much.
4 REPLIES 4

vinaxwater
Champ in-the-making
Champ in-the-making
i have a solution is: change href="#{r.name}" to href=""

Regards.

janejiao
Champ in-the-making
Champ in-the-making
Dear vinaxwater:
Thanks for your reply.
But above code doesn't work.
That would result in all users can't see the content link.

I want:
1) Login with Read user can read file content and can click the link, so only show the <a:actionLink>
2) Login with ReadProperties can't read file content and can't show the link of the file name, so only show the <hSmiley SurprisedutputText>

So I want to do as following code:

<!–Read permission–>
<r:permissionEvaluator value="#{r}" allow="Read">
       <a:actionLink id="col11-act2" value="#{r.name}" href="#{r.url}" target="new" styleClass="header"/>
</r:permissionEvaluator>

<!–ReadProperties permission–>
<r:permissionEvaluator value="#{r}" allow="ReadProperties">
   <h:outputText id="col11-act3" value="#{r.name}"/>
</r:permissionEvaluator>


But when I login with Read user will appear the <a:actionLink> and <hSmiley SurprisedutputText> at the same time.
I think because of the Read permission includes the ReadProperties permission.
Do you have other method to help me?

Thank you very much.
Best Regards.

janejiao
Champ in-the-making
Champ in-the-making
Dear alfresco:

I'm urgently waiting your replay……..

klaas
Champ in-the-making
Champ in-the-making