Oracle Fusion Middleware
Java API Reference for Oracle PDK Java
11g Release 1 (11.1.1)
E10691-01

oracle.portal.provider.v2.security
Class GroupSecurityManager

java.lang.Object
  extended by oracle.portal.provider.v2.security.PortletSecurityManager
      extended by oracle.portal.provider.v2.security.GroupSecurityManager

public class GroupSecurityManager
extends PortletSecurityManager

GroupSecurityManager is a simple access controller for a portlet that uses a user's membership of a group to control access. A user will be granted access to a portlet if the user is a member of a named group


Constructor Summary
GroupSecurityManager()
           
 
Method Summary
 void addGroup(java.lang.String name)
          Adds the group distinguished name for this security manager.
 boolean hasAccess(PortletReference ref, ProviderUser user)
          Verifies that the specified user is a member of one of the groups
 boolean hasAccess(ProviderInstance pi, PortletDefinition pd, ProviderUser user)
          Verifies that the specified user is a member of one of the groups
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupSecurityManager

public GroupSecurityManager()
Method Detail

hasAccess

public boolean hasAccess(ProviderInstance pi,
                         PortletDefinition pd,
                         ProviderUser user)
Verifies that the specified user is a member of one of the groups

Specified by:
hasAccess in class PortletSecurityManager
Parameters:
pi - the provider instance from which the portlet is being accessed.
pd - the definition of the portlet which we want to authorize access to.
user - the current user we are being asked to authorize.
Returns:
true is this user is authorized to access this portlet.

hasAccess

public boolean hasAccess(PortletReference ref,
                         ProviderUser user)
                  throws PortletNotFoundException
Verifies that the specified user is a member of one of the groups

Specified by:
hasAccess in class PortletSecurityManager
Parameters:
ref - the portlet reference
user - the current user we are being asked to authorize.
Returns:
true is this user is authorized to access this portlet instance.
Throws:
PortletNotFoundException

addGroup

public void addGroup(java.lang.String name)
              throws java.lang.IllegalStateException
Adds the group distinguished name for this security manager. Group distinghished names are like "cn=deptX,cn=Groups,dc=uk,dc=oracle,dc=com". This version of the method is intended for use by Providers that are initialized via the provider.xml file

Parameters:
name - String the group distinguished name
Throws:
java.lang.IllegalStateException

Oracle Fusion Middleware
Java API Reference for Oracle PDK Java
11g Release 1 (11.1.1)
E10691-01

Copyright (c) 1999, 2009, Oracle and/or its affiliates. All rights reserved.