@Override public Integer apply(@Nullable String input) { return Permissions.getType(input); } });
public void init(Map params) throws PluginParseException { permission = Permissions.getType((String) params.get("permission")); if (permission == -1) { throw new PluginParseException("Could not determine permission type for: " + params.get("permission")); } super.init(params); }
public void init(Map<String,String> params) throws PluginParseException { permission = Permissions.getType(params.get("permission")); if (permission == -1) { throw new PluginParseException("Could not determine permission type for: " + params.get("permission")); } super.init(params); }
private Decision authoriseForRoleViaJIRA(ApplicationUser user, String role) { // taken from the old JiraRoleMapper code and moved into here for consistency final int permissionType = Permissions.getType(role); if (permissionType == -1) { // change of behaviour here. In the old day before pluggable roles, then set of roles // was a known set and hence this post condition was a valid thing to do. // // but now with pluggable roles, this is no longer the case // //throw new IllegalArgumentException("Unknown role '" + role + "'"); // return DENIED; } return toDecision(permissionManager.hasPermission(permissionType, user)); }
for (String role : roles) final int permission = Permissions.getType(role); if (permission == -1)