[KEYCLOAK-3135] - More UI tests
This commit is contained in:
1 parent
dfec691de0
commit
5972c94dc8
38 files changed
+2595
-45
No files matched your search
+8
@@ -88,6 +88,10 @@ public class AbstractPolicyRepresentation {
|
||||
return policies;
|
||||
}
|
||||
|
||||
public void setPolicies(Set<String> policies) {
|
||||
this.policies = policies;
|
||||
}
|
||||
|
||||
public void addPolicy(String... id) {
|
||||
if (this.policies == null) {
|
||||
this.policies = new HashSet<>();
|
||||
@@ -99,6 +103,10 @@ public class AbstractPolicyRepresentation {
|
||||
return resources;
|
||||
}
|
||||
|
||||
public void setResources(Set<String> resources) {
|
||||
this.resources = resources;
|
||||
}
|
||||
|
||||
public void addResource(String id) {
|
||||
if (this.resources == null) {
|
||||
this.resources = new HashSet<>();
|
||||
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright 2016 Red Hat, Inc. and/or its affiliates
|
||||
* and other contributors as indicated by the @author tags.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.keycloak.representations.idm.authorization;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:psilva@redhat.com">Pedro Igor</a>
|
||||
*/
|
||||
public class AggregatePolicyRepresentation extends AbstractPolicyRepresentation {
|
||||
|
||||
@Override
|
||||
public String getType() {
|
||||
return "aggregate";
|
||||
}
|
||||
}
|
||||
+5
@@ -23,6 +23,11 @@ public class JSPolicyRepresentation extends AbstractPolicyRepresentation {
|
||||
|
||||
private String code;
|
||||
|
||||
@Override
|
||||
public String getType() {
|
||||
return "js";
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
+5
@@ -26,6 +26,11 @@ public class RolePolicyRepresentation extends AbstractPolicyRepresentation {
|
||||
|
||||
private Set<RoleDefinition> roles;
|
||||
|
||||
@Override
|
||||
public String getType() {
|
||||
return "role";
|
||||
}
|
||||
|
||||
public Set<RoleDefinition> getRoles() {
|
||||
return roles;
|
||||
}
|
||||
|
||||
+5
@@ -34,6 +34,11 @@ public class TimePolicyRepresentation extends AbstractPolicyRepresentation {
|
||||
private String minute;
|
||||
private String minuteEnd;
|
||||
|
||||
@Override
|
||||
public String getType() {
|
||||
return "time";
|
||||
}
|
||||
|
||||
public String getNotBefore() {
|
||||
return notBefore;
|
||||
}
|
||||
|
||||
+5
@@ -26,6 +26,11 @@ public class UserPolicyRepresentation extends AbstractPolicyRepresentation {
|
||||
|
||||
private Set<String> users;
|
||||
|
||||
@Override
|
||||
public String getType() {
|
||||
return "user";
|
||||
}
|
||||
|
||||
public Set<String> getUsers() {
|
||||
return users;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user