I want to display / nodisplay title based on my user access.
I have below code where i determine my access (hasaccess)
Can i also use same access (hasaccess) to display title if have access and no title if i have no access.
This is what i have written not sure where i am making mistake.
I have below code where i determine my access (hasaccess)
bool hasAccess = false;
if (Session.UserRights != null)
{
if(EngineClient.UserHasAccess(Session.UserRights, doc.AccessL1, doc.Denied1))
{
hasAccess= true;
}
}
if (hasAccess == false)
{ Display Image }
else { Display No Image }
Can i also use same access (hasaccess) to display title if have access and no title if i have no access.
This is what i have written not sure where i am making mistake.
if (hasAccess == true)
{ Display Preview }
else
{ <% return false %>
}
Last edited by a moderator: