- boolean quit = false;
- if(role==null) {
- msg("Role is null");
- quit = true;
- }
- if(user==null) {
- msg("User is null");
- quit = true;
- }
- if(!quit) {
- if(role.startsWith(user) && role.endsWith(":user")) {
- if(!(role.length() == user.length() + 5)) {
- msg("Role [" + role + "] is invalid.");
- }
- } else if (nob(role, NAME_CHARS)) {
- msg("Role [" + role + "] is invalid.");
- }
- }
+ boolean quit = false;
+ if(role==null) {
+ msg("Role is null");
+ quit = true;
+ }
+ if(user==null) {
+ msg("User is null");
+ quit = true;
+ }
+ if(!quit) {
+ if(role.startsWith(user) && role.endsWith(":user")) {
+ if(!(role.length() == user.length() + 5)) {
+ msg(ROLE_STR + role + IS_INVALID);
+ }
+ } else if (nob(role, NAME_CHARS)) {
+ msg(ROLE_STR + role + IS_INVALID);
+ }
+ }