summaryrefslogtreecommitdiffstats
path: root/auth
diff options
context:
space:
mode:
Diffstat (limited to 'auth')
-rw-r--r--auth/auth-core/src/main/java/org/onap/aaf/auth/org/OrganizationFactory.java2
-rw-r--r--auth/auth-core/src/main/java/org/onap/aaf/auth/validation/Validator.java7
-rw-r--r--auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/Page.java19
-rw-r--r--auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/Home.java16
4 files changed, 24 insertions, 20 deletions
diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/org/OrganizationFactory.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/org/OrganizationFactory.java
index 943b92f5..098fb979 100644
--- a/auth/auth-core/src/main/java/org/onap/aaf/auth/org/OrganizationFactory.java
+++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/org/OrganizationFactory.java
@@ -71,7 +71,7 @@ public class OrganizationFactory {
String realm = env.getProperty(Config.AAF_DEFAULT_REALM,"people.osaaf.org");
defaultOrg = cnst.newInstance(env,realm);
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | NoSuchMethodException | SecurityException | IllegalArgumentException | InvocationTargetException e) {
- env.warn().log("Default Organization Module not linked in",e);
+ env.init().log("Default Organization Module not linked in",e);
}
}
if (defaultOrg == null) {
diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/validation/Validator.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/validation/Validator.java
index c0f2f530..98c09076 100644
--- a/auth/auth-core/src/main/java/org/onap/aaf/auth/validation/Validator.java
+++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/validation/Validator.java
@@ -185,13 +185,16 @@ public class Validator {
}
public final Validator role(String user, String role) {
+ boolean quit = false;
if(role==null) {
msg("Role is null");
+ quit = true;
}
if(user==null) {
- msg("User is null");
+ msg("User is null");
+ quit = true;
}
- if(!err()) {
+ if(!quit) {
if(role.startsWith(user) && role.endsWith(":user")) {
if(!(role.length() == user.length() + 5)) {
msg("Role [" + role + "] is invalid.");
diff --git a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/Page.java b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/Page.java
index 243e66b8..9abd5ee0 100644
--- a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/Page.java
+++ b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/Page.java
@@ -92,6 +92,23 @@ public class Page extends HTMLCacheGen {
// Note: Only access is synchronized in "getPerm"
private final static Map<String,Map<String,Permission>> perms = new HashMap<>();
+
+ /*
+ * Relative path, Menu Name, Full Path
+ */
+ protected static final String[][] MENU_ITEMS = new String[][] {
+ {"myperms","My Permissions","/gui/myperms"},
+ {"myroles","My Roles","/gui/myroles"},
+ {"ns","My Namespaces","/gui/ns"},
+ {"approve","My Approvals","/gui/approve"},
+ {"myrequests","My Pending Requests","/gui/myrequests"},
+ // Enable later
+ // {"onboard","Onboarding"},
+ {"passwd","Password Management","/gui/passwd"},
+ {"cui","Command Prompt","/gui/cui"},
+ {"api","AAF API","/gui/api"},
+ {"clear","Clear Preferences","/gui/clear"}
+ };
public String name() {
return bcName;
@@ -426,7 +443,7 @@ public class Page extends HTMLCacheGen {
.text("Home")
.end(2);
boolean noSelection = !selected;
- for(String[] mi : Home.MENU_ITEMS) {
+ for(String[] mi : MENU_ITEMS) {
//selected = trans.path().endsWith(mi[0]);
if(noSelection) {
selected = isSelected(trans.path(),mi[2]);
diff --git a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/Home.java b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/Home.java
index 463ee11a..73e118a2 100644
--- a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/Home.java
+++ b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/Home.java
@@ -37,22 +37,6 @@ import org.onap.aaf.misc.xgen.html.HTMLGen;
public class Home extends Page {
public static final String HREF = "/gui/home";
- /*
- * Relative path, Menu Name, Full Path
- */
- public static final String[][] MENU_ITEMS = new String[][] {
- {"myperms","My Permissions","/gui/myperms"},
- {"myroles","My Roles","/gui/myroles"},
- {"ns","My Namespaces","/gui/ns"},
- {"approve","My Approvals","/gui/approve"},
- {"myrequests","My Pending Requests","/gui/myrequests"},
- // Enable later
- // {"onboard","Onboarding"},
- {"passwd","Password Management","/gui/passwd"},
- {"cui","Command Prompt","/gui/cui"},
- {"api","AAF API","/gui/api"},
- {"clear","Clear Preferences","/gui/clear"}
- };
public Home(final AAF_GUI gui) throws APIException, IOException {
super(gui.env,"Home",HREF, NO_FIELDS, new NamedCode(false,"content") {