Class OSessionSecurity
java.lang.Object
com.orientechnologies.orient.core.metadata.security.OSessionSecurity
- All Implemented Interfaces:
OSecurity
Proxy class for user management
- Author:
- Luca Garulli (l.garulli--(at)--orientdb.com)
-
Field Summary
Fields inherited from interface com.orientechnologies.orient.core.metadata.security.OSecurity
ALLOW_ALL_FIELD, ALLOW_DELETE_FIELD, ALLOW_READ_FIELD, ALLOW_UPDATE_FIELD, IDENTITY_CLASSNAME, ONCREATE_FIELD, ONCREATE_IDENTITY_TYPE, RESTRICTED_CLASSNAME -
Constructor Summary
ConstructorsConstructorDescriptionOSessionSecurity(OSecurityInternal security, ODatabaseDocumentInternal session) -
Method Summary
Modifier and TypeMethodDescriptionallowRole(ODocument iDocument, ORestrictedOperation iOperationType, String iRoleName) Record level security: allows a role to access to a record.allowUser(ODocument iDocument, ORestrictedOperation iOperationType, String iUserName) Record level security: allows a user to access to a record.authenticate(OToken authToken) authenticate(String iUsername, String iUserPassword) createRole(String iRoleName, ORole iParent, OSecurityRole.ALLOW_MODES iAllowMode) createRole(String iRoleName, OSecurityRole.ALLOW_MODES iAllowMode) createUser(String iUserName, String iUserPassword, ORole... iRoles) createUser(String iUserName, String iUserPassword, String... iRoles) denyRole(ODocument iDocument, ORestrictedOperation iOperationType, String iRoleName) Record level security: deny a role to access to a record.denyUser(ODocument iDocument, ORestrictedOperation iOperationType, String iUserName) Record level security: deny a user to access to a record.booleanbooleangetRole(OIdentifiable iRole) booleanisAllowed(Set<OIdentifiable> iAllowAll, Set<OIdentifiable> iAllowOperation) toString()
-
Constructor Details
-
OSessionSecurity
-
-
Method Details
-
isAllowed
-
allowUser
public OIdentifiable allowUser(ODocument iDocument, ORestrictedOperation iOperationType, String iUserName) Description copied from interface:OSecurityRecord level security: allows a user to access to a record.- Specified by:
allowUserin interfaceOSecurity- Parameters:
iDocument- ODocument instance to give accessiOperationType- Operation type to use based on the permission to allow:- ALLOW_ALL, to provide full access (RUD)
- ALLOW_READ, to provide read access
- ALLOW_UPDATE, to provide update access
- ALLOW_DELETE, to provide delete access
iUserName- User name to provide the access- Returns:
- The OIdentity instance allowed
-
allowRole
public OIdentifiable allowRole(ODocument iDocument, ORestrictedOperation iOperationType, String iRoleName) Description copied from interface:OSecurityRecord level security: allows a role to access to a record.- Specified by:
allowRolein interfaceOSecurity- Parameters:
iDocument- ODocument instance to give accessiOperationType- Operation type to use based on the permission to allow:- ALLOW_ALL, to provide full access (RUD)
- ALLOW_READ, to provide read access
- ALLOW_UPDATE, to provide update access
- ALLOW_DELETE, to provide delete access
iRoleName- Role name to provide the access- Returns:
- The OIdentity instance allowed
-
denyUser
public OIdentifiable denyUser(ODocument iDocument, ORestrictedOperation iOperationType, String iUserName) Description copied from interface:OSecurityRecord level security: deny a user to access to a record.- Specified by:
denyUserin interfaceOSecurity- Parameters:
iDocument- ODocument instance to give accessiOperationType- Operation type to use based on the permission to deny:- ALLOW_ALL, to provide full access (RUD)
- ALLOW_READ, to provide read access
- ALLOW_UPDATE, to provide update access
- ALLOW_DELETE, to provide delete access
iUserName- User name to deny the access- Returns:
- The OIdentity instance denied
-
denyRole
public OIdentifiable denyRole(ODocument iDocument, ORestrictedOperation iOperationType, String iRoleName) Description copied from interface:OSecurityRecord level security: deny a role to access to a record.- Specified by:
denyRolein interfaceOSecurity- Parameters:
iDocument- ODocument instance to give accessiOperationType- Operation type to use based on the permission to deny:- ALLOW_ALL, to provide full access (RUD)
- ALLOW_READ, to provide read access
- ALLOW_UPDATE, to provide update access
- ALLOW_DELETE, to provide delete access
iRoleName- Role name to deny the access- Returns:
- The OIdentity instance denied
-
authenticate
- Specified by:
authenticatein interfaceOSecurity
-
authenticate
- Specified by:
authenticatein interfaceOSecurity
-
getUser
-
getUser
-
createUser
- Specified by:
createUserin interfaceOSecurity
-
createUser
- Specified by:
createUserin interfaceOSecurity
-
getRole
-
getRole
-
createRole
- Specified by:
createRolein interfaceOSecurity
-
createRole
- Specified by:
createRolein interfaceOSecurity
-
getAllUsers
- Specified by:
getAllUsersin interfaceOSecurity
-
getAllRoles
- Specified by:
getAllRolesin interfaceOSecurity
-
toString
-
dropUser
-
dropRole
-