org.jasig.portlet.announcements.service
Class UserPermissionChecker
java.lang.Object
org.jasig.portlet.announcements.service.UserPermissionChecker
public class UserPermissionChecker
- extends Object
- Author:
- Erik A. Olsson (eolsson@uci.edu)
$LastChangedBy$
$LastChangedDate$
Utility class that can be used statically to check role membership of a Topic, or when
instantiated, can be used inside a JSP for example to check role membership as it relates to
a specific Topic.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
admin
public boolean admin
moderator
public boolean moderator
author
public boolean author
audience
public boolean audience
userName
public String userName
UserPermissionChecker
public UserPermissionChecker(javax.portlet.PortletRequest request,
Topic topic)
- Parameters:
request - topic -
isPortalAdmin
public static boolean isPortalAdmin(javax.portlet.PortletRequest request)
inRoleForTopic
public static boolean inRoleForTopic(javax.portlet.PortletRequest request,
String role,
Topic topic)
- Parameters:
request - role - topic -
- Returns:
- true if the user in the PortletRequest has the role specified by the Topic
getUserName
public String getUserName()
- Returns:
- the userName
isAdmin
public boolean isAdmin()
- Returns:
- the admin
isModerator
public boolean isModerator()
- Returns:
- the moderator
isAuthor
public boolean isAuthor()
- Returns:
- the author
isAudience
public boolean isAudience()
- Returns:
- the audience
Copyright © 2012 Jasig, Inc.. All Rights Reserved.