# Uses of Enum Class
com.logicaldoc.core.security.Permission

Packages that use Permission
Package
Description
com.logicaldoc.core.document
Contains the definitions of `Document` and `Version` as well as other related objects
com.logicaldoc.core.folder
Contains the definitions of `Folder` as well as other related objects
com.logicaldoc.core.metadata
Package that collects the template and attribute sets definitions.
Many objects of the LogicalDOC platform are extensible and can store your custom metadata, they are all those that extends the `ExtensibleObject`.
com.logicaldoc.core.security
Container of the security-related interfaces and classes
com.logicaldoc.core.security.authorization
com.logicaldoc.core.security.menu
Package for the Menu, a menu represent a graphical element of the user interface

## Uses of Permission in com.logicaldoc.core.document

Methods in com.logicaldoc.core.document that return types with arguments of type Permission
Modifier and Type
Method
Description
`Set<Permission>`
DocumentDAO.`getAllowedPermissions(long documentId, long userId)`
Finds all permissions of a user enabled on the specified document
`Set<Permission>`
DocumentNoteDAO.`getAllowedPermissions(long noteId, long userId)`
Finds all permissions of a user enabled on the specified note
`Set<Permission>`
HibernateDocumentDAO.`getAllowedPermissions(long docId, long userId)`
`Set<Permission>`
HibernateDocumentNoteDAO.`getAllowedPermissions(long noteId, long userId)`
`Set<Permission>`
DocumentAccessControlEntry.`grantedPermissions()`
`Set<Permission>`
FolderAccessControlEntry.`grantedPermissions()`
`Set<Permission>`
NoteAccessControlEntry.`grantedPermissions()`
Methods in com.logicaldoc.core.document with parameters of type Permission
Modifier and Type
Method
Description
`boolean`
DocumentDAO.`isPermissionAllowed(Permission permission, long documentId, long userId)`
This method checks if the given permission is enabled for a document and an user.
`boolean`
HibernateDocumentDAO.`isPermissionAllowed(Permission permission, long documentId, long userId)`
Method parameters in com.logicaldoc.core.document with type arguments of type Permission
Modifier and Type
Method
Description
`void`
DocumentAccessControlEntry.`grantPermissions(Set<Permission> permissions)`
`void`
FolderAccessControlEntry.`grantPermissions(Set<Permission> permissions)`
`void`
NoteAccessControlEntry.`grantPermissions(Set<Permission> permissions)`

## Uses of Permission in com.logicaldoc.core.folder

Methods in com.logicaldoc.core.folder that return types with arguments of type Permission
Modifier and Type
Method
Description
`Set<Permission>`
FolderDAO.`getAllowedPermissions(long folderId, long userId)`
Finds all permissions of a user enabled on the specified folder
`Set<Permission>`
HibernateFolderDAO.`getAllowedPermissions(long folderId, long userId)`
Methods in com.logicaldoc.core.folder with parameters of type Permission
Modifier and Type
Method
Description
`Collection<Long>`
FolderDAO.`findFolderIdByUserIdAndPermission(long userId, Permission permission, Long parentId, boolean tree)`
Finds all folders ids with a specific permission enabled on the specifies user
`Collection<Long>`
HibernateFolderDAO.`findFolderIdByUserIdAndPermission(long userId, Permission permission, Long parentId, boolean tree)`
`boolean`
FolderDAO.`isPermissionAllowed(Permission permission, long folderId, long userId)`
This method checks if the given permission is allowed for a folder and an user.
`boolean`
HibernateFolderDAO.`isPermissionAllowed(Permission permission, long folderId, long userId)`

## Uses of Permission in com.logicaldoc.core.metadata

Methods in com.logicaldoc.core.metadata that return types with arguments of type Permission
Modifier and Type
Method
Description
`Set<Permission>`
HibernateTemplateDAO.`getAllowedPermissions(long templateId, long userId)`
`Set<Permission>`
TemplateDAO.`getAllowedPermissions(long templateId, long userId)`
Finds all permissions of a user enabled on the specified template

## Uses of Permission in com.logicaldoc.core.security

Methods in com.logicaldoc.core.security that return Permission
Modifier and Type
Method
Description
`static Permission`
Permission.`valueOf(String name)`
Returns the enum constant of this class with the specified name.
`static Permission[]`
Permission.`values()`
Returns an array containing the constants of this enum class, in the order they are declared.
Methods in com.logicaldoc.core.security that return types with arguments of type Permission
Modifier and Type
Method
Description
`static Set<Permission>`
Permission.`all()`
`static Set<Permission>`
Permission.`forGuests()`
`Set<Permission>`
AccessControlEntry.`grantedPermissions()`
`Set<Permission>`
ExtendedAccessControlEntry.`grantedPermissions()`
`static Set<Permission>`
Permission.`match(String... names)`
Method parameters in com.logicaldoc.core.security with type arguments of type Permission
Modifier and Type
Method
Description
`void`
AccessControlEntry.`grantPermissions(Set<Permission> permissions)`
`void`
ExtendedAccessControlEntry.`grantPermissions(Set<Permission> permissions)`

## Uses of Permission in com.logicaldoc.core.security.authorization

Methods in com.logicaldoc.core.security.authorization that return Permission
Modifier and Type
Method
Description
`Permission`
PermissionException.`getPermission()`
Constructors in com.logicaldoc.core.security.authorization with parameters of type Permission
Modifier
Constructor
Description
``
`PermissionException(String username, String securityObject, Permission permission)`
``
`PermissionException(String username, String securityObject, Permission permission, Throwable cause)`

## Uses of Permission in com.logicaldoc.core.security.menu

Methods in com.logicaldoc.core.security.menu with parameters of type Permission
Modifier and Type
Method
Description
`List<Long>`
HibernateMenuDAO.`findMenuIdByUserIdAndPermission(long userId, Permission permission, boolean enabledOnly)`
`List<Long>`
MenuDAO.`findMenuIdByUserIdAndPermission(long userId, Permission permission, boolean enabledOnly)`
Finds all menus ids with a specific permission enabled on the specified user