Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.atlassian.bamboo.security
Class DefaultPermissionManager

    java.lang.Object
      com.atlassian.bamboo.security.DefaultPermissionManager

All Implemented Interfaces:
  PermissionManager

    public class DefaultPermissionManager

extends Object
implements PermissionManager

Field Summary

Fields inherited from interface com.atlassian.bamboo.security.PermissionManager
`GLOBAL_PERMISSION`

Constructor Summary
`DefaultPermissionManager()`

Method Summary
`List` | `filterPermittedEntities(User user, Permission permission, Iterator objects, int maxResults)` Filter an iterator based on which entities in the list have a particular permission.
`List` | `filterPermittedEntities(User user, Permission permission, List objects)` Filter a list based on which entities in the list have a particular permission.
`boolean` | `hasPermission(User user, Permission permission, Object target)` Determine whether a user has a particular permission against a given target.
`void` | `setBambooUserManager(BambooUserManager bambooUserManager)`
`void` | `setDefaultDelegate(PermissionDelegate defaultDelegate)`
`void` | `setDelegates(Map delegates)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DefaultPermissionManager

    public DefaultPermissionManager()

Method Detail

### hasPermission

    public boolean hasPermission(User user,
                                 Permission permission,
                                 Object target)

  Description copied from interface: `PermissionManager`
  Determine whether a user has a particular permission against a given target.

  Specified by:
    `hasPermission` in interface `PermissionManager`
  Parameters:
    `user` - the user seeking permission, or null if the anonymous user is being checked against
    `permission` - the permission to check
    `target` - the object that the permission is being checked against. If this object is null, the method will return false
  Returns:
    true if the user has this permission, false otherwise

### filterPermittedEntities

    public List filterPermittedEntities(User user,
                                        Permission permission,
                                        List objects)

  Description copied from interface: `PermissionManager`
  Filter a list based on which entities in the list have a particular permission.

  Specified by:
    `filterPermittedEntities` in interface `PermissionManager`
  Parameters:
    `user` - the user seeking permission, or null if the anonymous user is being checked against
    `permission` - the permission to check against the objects
    `objects` - the objects to check
  Returns:
    a new list of those members of the objects list that satisfy the given permission for the user

### filterPermittedEntities

    public List filterPermittedEntities(User user,
                                        Permission permission,
                                        Iterator objects,
                                        int maxResults)

  Description copied from interface: `PermissionManager`
  Filter an iterator based on which entities in the list have a particular permission.

  Specified by:
    `filterPermittedEntities` in interface `PermissionManager`
  Parameters:
    `user` - the user seeking permission, or null if the anonymous user is being checked against
    `permission` - the permission to check against the objects
    `objects` - the objects to check
    `maxResults` - the maximum number of permitted entities to retrieve from the iterator (un-permitted entities are not counted)
  Returns:
    a new list of those members of the objects list that satisfy the given permission for the user

### setBambooUserManager

    public void setBambooUserManager(BambooUserManager bambooUserManager)

### setDelegates

    public void setDelegates(Map delegates)

### setDefaultDelegate

    public void setDefaultDelegate(PermissionDelegate defaultDelegate)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 Atlassian Software Systems. All Rights Reserved.