本文整理了Java中org.camunda.bpm.engine.authorization.Authorization.isEveryPermissionRevoked()
方法的一些代码示例,展示了Authorization.isEveryPermissionRevoked()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Authorization.isEveryPermissionRevoked()
方法的具体详情如下:
包路径:org.camunda.bpm.engine.authorization.Authorization
类名称:Authorization
方法名:isEveryPermissionRevoked
[英]Allows checking whether this authorization revokes every single permission.
[中]允许检查此授权是否撤消每个权限。
代码示例来源:origin: camunda/camunda-bpm-platform
public static String[] getNamesForPermissions(Authorization authorization, Permission[] permissions) {
int type = authorization.getAuthorizationType();
// special case all permissions are granted
if ((type == Authorization.AUTH_TYPE_GLOBAL || type == Authorization.AUTH_TYPE_GRANT)
&& authorization.isEveryPermissionGranted()) {
return new String[] { Permissions.ALL.getName() };
}
// special case all permissions are revoked
if (type == Authorization.AUTH_TYPE_REVOKE && authorization.isEveryPermissionRevoked()) {
return new String[] { Permissions.ALL.getName() };
}
List<String> names = new ArrayList<String>();
for (Permission permission : permissions) {
String name = permission.getName();
// filter NONE and ALL from permissions array
if (!name.equals(Permissions.NONE.getName()) && !name.equals(Permissions.ALL.getName())) {
names.add(name);
}
}
return names.toArray(new String[names.size()]);
}
代码示例来源:origin: camunda/camunda-bpm-platform
public static String[] getNamesForPermissions(Authorization authorization, Permission[] permissions) {
int type = authorization.getAuthorizationType();
// special case all permissions are granted
if ((type == Authorization.AUTH_TYPE_GLOBAL || type == Authorization.AUTH_TYPE_GRANT)
&& authorization.isEveryPermissionGranted()) {
return new String[] { Permissions.ALL.getName() };
}
// special case all permissions are revoked
if (type == Authorization.AUTH_TYPE_REVOKE && authorization.isEveryPermissionRevoked()) {
return new String[] { Permissions.ALL.getName() };
}
List<String> names = new ArrayList<String>();
for (Permission permission : permissions) {
String name = permission.getName();
// filter NONE and ALL from permissions array
if (!name.equals(Permissions.NONE.getName()) && !name.equals(Permissions.ALL.getName())) {
names.add(name);
}
}
return names.toArray(new String[names.size()]);
}
代码示例来源:origin: org.camunda.bpm/camunda-engine-rest-jaxrs2
public static String[] getNamesForPermissions(Authorization authorization, Permission[] permissions) {
int type = authorization.getAuthorizationType();
// special case all permissions are granted
if ((type == Authorization.AUTH_TYPE_GLOBAL || type == Authorization.AUTH_TYPE_GRANT)
&& authorization.isEveryPermissionGranted()) {
return new String[] { Permissions.ALL.getName() };
}
// special case all permissions are revoked
if (type == Authorization.AUTH_TYPE_REVOKE && authorization.isEveryPermissionRevoked()) {
return new String[] { Permissions.ALL.getName() };
}
List<String> names = new ArrayList<String>();
for (Permission permission : permissions) {
String name = permission.getName();
// filter NONE and ALL from permissions array
if (!name.equals(Permissions.NONE.getName()) && !name.equals(Permissions.ALL.getName())) {
names.add(name);
}
}
return names.toArray(new String[names.size()]);
}
内容来源于网络,如有侵权,请联系作者删除!