## org.exist.security
Interface SecurityManager

All Known Implementing Classes:
  LDAPbindSecurityManager, LDAPSecurityManager, XMLSecurityManager

public interface SecurityManager

SecurityManager is responsible for managing users and groups. There's only one SecurityManager for each database instance, which may be obtained by `BrokerPool.getSecurityManager()`. Users and groups are stored in the system collection, in document users.xml. While it is possible to edit this file by hand, it may lead to unexpected results, since SecurityManager reads users.xml only during database startup and shutdown.

Field Summary
`static java.lang.String` `ACL_FILE`
`static XmldbURI` `ACL_FILE_URI`
`static java.lang.String` `DBA_GROUP`
`static java.lang.String` `DBA_USER`
`static java.lang.String` `GUEST_GROUP`
`static java.lang.String` `GUEST_USER`
`static User` `SYSTEM_USER`

Method Summary
`void` `addGroup(java.lang.String name)`
`void` `attach(BrokerPool pool, DBBroker sysBroker)`
`void` `deleteUser(java.lang.String name)`
`void` `deleteUser(User user)`
`int` `getCollectionDefaultPerms()`
`Group` `getGroup(int gid)`
`Group` `getGroup(java.lang.String name)`
`java.lang.String[]` `getGroups()`
`ExistPDP` `getPDP()`
`int` `getResourceDefaultPerms()`
`User` `getUser(int uid)`
`User` `getUser(java.lang.String name)`
`User[]` `getUsers()`
`boolean` `hasAdminPrivileges(User user)`
`boolean` `hasGroup(java.lang.String name)`
`boolean` `hasUser(java.lang.String name)`
`boolean` `isXACMLEnabled()`
`void` `setUser(User user)`

Field Detail

### ACL_FILE

    public static final java.lang.String ACL_FILE

See Also:
  Constant Field Values

### ACL_FILE_URI

    public static final XmldbURI ACL_FILE_URI

### DBA_GROUP

    public static final java.lang.String DBA_GROUP

See Also:
  Constant Field Values

### DBA_USER

    public static final java.lang.String DBA_USER

See Also:
  Constant Field Values

### GUEST_GROUP

    public static final java.lang.String GUEST_GROUP

See Also:
  Constant Field Values

### GUEST_USER

    public static final java.lang.String GUEST_USER

See Also:
  Constant Field Values

### SYSTEM_USER

    public static final User SYSTEM_USER

Method Detail

### attach

    public void attach(BrokerPool pool,
                       DBBroker sysBroker)

### isXACMLEnabled

    public boolean isXACMLEnabled()

### getPDP

    public ExistPDP getPDP()

### deleteUser

    public void deleteUser(java.lang.String name)
                    throws PermissionDeniedException

  Throws:
    `PermissionDeniedException`

### deleteUser

    public void deleteUser(User user)
                    throws PermissionDeniedException

  Throws:
    `PermissionDeniedException`

### getUser

    public User getUser(java.lang.String name)

### getUser

    public User getUser(int uid)

### getUsers

    public User[] getUsers()

### addGroup

    public void addGroup(java.lang.String name)

### hasGroup

    public boolean hasGroup(java.lang.String name)

### getGroup

    public Group getGroup(java.lang.String name)

### getGroup

    public Group getGroup(int gid)

### getGroups

    public java.lang.String[] getGroups()

### hasAdminPrivileges

    public boolean hasAdminPrivileges(User user)

### hasUser

    public boolean hasUser(java.lang.String name)

### setUser

    public void setUser(User user)

### getResourceDefaultPerms

    public int getResourceDefaultPerms()

### getCollectionDefaultPerms

    public int getCollectionDefaultPerms()

Copyright (C) Wolfgang Meier. All rights reserved.