mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-13 14:12:11 +00:00
Bug 5040: added method to check if user has a server permission to
SecurityService
This commit is contained in:
1 parent
67e5239873
commit
4d6196b096
2 files changed
+10
-1
No files matched your search
@@ -1700,6 +1700,13 @@ public class SecurityServiceImpl implements ReplicableSecurityService, ClearStat
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCurrentUserServerPermission(ServerActions action) {
|
||||
return SecurityUtils.getSubject().isPermitted(
|
||||
SecuredSecurityTypes.SERVER.getStringPermissionForTypeRelativeIdentifier(
|
||||
ServerActions.CREATE_OBJECT, new TypeRelativeObjectIdentifier(ServerInfo.getName())));
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T setOwnershipWithoutCheckPermissionForObjectCreationAndRevertOnError(HasPermissions type,
|
||||
TypeRelativeObjectIdentifier typeIdentifier, String securityDisplayName, Callable<T> actionWithResult) {
|
||||
|
||||
Reference in new issue
Block a user