Add adminrestrictions to some features!

Posted:
Sun May 13, 2007 5:02 pm
by PeeGee
Hi all,
Is there a string for me to add in the jsp-files if I want to restrict some features to the adminrole?
For some of my users I might like to hide for example the features under "More" and so on!
Regards / Patrik

Posted:
Wed Oct 03, 2007 11:50 am
by PeeGee
Sindre,
Is this doable?
Regards / PG

Posted:
Sat Oct 06, 2007 2:07 pm
by sindre_mehus
Generally speaking: no. You would have to change the underlying java code and recompile. However, for the following pages you can do it:
loadPlaylist.jsp
main.jsp
playlist.jsp
podcastReceiver.jsp
top.jsp
This is the syntax:
- Code: Select all
<c:if test="${model.user.adminRole}">
... Stuff you like to restrict ...
</c:if>
Sindre

Posted:
Fri Dec 10, 2010 6:10 pm
by swocoom
I know this is an old post, but I was running across this myself. Wanted to add restrictions on the home page so the users button was showing to only admins. Any page you want to add this on, you will need to recompile. But you can simply add the line:
map.put("user", securityService.getCurrentUser(request));
This will allow you to use:
<c:if test="${model.user.adminRole}">
on any page you wish to restrict to admin users.