public class EditorAuthorizationServiceImpl extends Object implements EditorAuthorizationService
Constructor and Description |
---|
EditorAuthorizationServiceImpl(org.gbif.api.service.registry.DatasetService datasetService,
org.gbif.api.service.registry.InstallationService installationService,
org.gbif.api.service.registry.OrganizationService organizationService,
UserRightsMapper userRightsMapper) |
Modifier and Type | Method and Description |
---|---|
boolean |
allowedToDeleteMachineTag(Principal user,
int machineTagKey) |
boolean |
allowedToModifyDataset(Principal user,
UUID datasetKey) |
boolean |
allowedToModifyEntity(Principal user,
UUID key)
Checks whether a given registry entity is explicitly part of the list of entities for an editor user.
|
boolean |
allowedToModifyInstallation(Principal user,
UUID installationKey) |
boolean |
allowedToModifyNamespace(Principal user,
String ns)
Checks whether a given user is allowed to modify machine tags belonging to the given namespace.
|
boolean |
allowedToModifyOrganization(Principal user,
UUID orgKey) |
@Inject public EditorAuthorizationServiceImpl(org.gbif.api.service.registry.DatasetService datasetService, org.gbif.api.service.registry.InstallationService installationService, org.gbif.api.service.registry.OrganizationService organizationService, UserRightsMapper userRightsMapper)
public boolean allowedToModifyNamespace(Principal user, String ns)
EditorAuthorizationService
allowedToModifyNamespace
in interface EditorAuthorizationService
user
- the security context user principalns
- the namespace in questionpublic boolean allowedToDeleteMachineTag(Principal user, int machineTagKey)
allowedToDeleteMachineTag
in interface EditorAuthorizationService
public boolean allowedToModifyEntity(Principal user, UUID key)
EditorAuthorizationService
allowedToModifyEntity
in interface EditorAuthorizationService
user
- the security context user principalkey
- the entity in questionpublic boolean allowedToModifyDataset(Principal user, UUID datasetKey)
allowedToModifyDataset
in interface EditorAuthorizationService
public boolean allowedToModifyOrganization(Principal user, UUID orgKey)
allowedToModifyOrganization
in interface EditorAuthorizationService
public boolean allowedToModifyInstallation(Principal user, UUID installationKey)
allowedToModifyInstallation
in interface EditorAuthorizationService
Copyright © 2016 Global Biodiversity Information Facility. All rights reserved.