Skip to content

Commit

Permalink
SuperAdmin Functionalities for Multitenancy part 1
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.forge.objectweb.org/svnroot/spagobi/V_4.x/Server/trunk@21512 99afaf0d-6903-0410-885a-c66a8bbb5f81
  • Loading branch information
rosso83 committed Dec 6, 2013
1 parent c803919 commit c320931
Show file tree
Hide file tree
Showing 8 changed files with 197 additions and 111 deletions.
18 changes: 17 additions & 1 deletion SpagoBIUtils/src/it/eng/spagobi/commons/bo/Role.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package it.eng.spagobi.commons.bo;

import java.io.Serializable;
import java.util.List;


/**
Expand Down Expand Up @@ -47,7 +48,7 @@ public class Role implements Serializable {

private boolean defaultRole;

// private List<RoleMetaModelCategory> roleMetaModelCategories;
private List<RoleMetaModelCategory> roleMetaModelCategories;

/**
* Checks if is able to save subobjects.
Expand Down Expand Up @@ -501,5 +502,20 @@ public String getOrganization() {
public void setOrganization(String organization) {
this.organization = organization;
}

/**
* @return the roleMetaModelCategories
*/
public List<RoleMetaModelCategory> getRoleMetaModelCategories() {
return roleMetaModelCategories;
}

/**
* @param roleMetaModelCategories the roleMetaModelCategories to set
*/
public void setRoleMetaModelCategories(
List<RoleMetaModelCategory> roleMetaModelCategories) {
this.roleMetaModelCategories = roleMetaModelCategories;
}

}
13 changes: 12 additions & 1 deletion SpagoBIUtils/src/it/eng/spagobi/commons/bo/UserProfile.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ public class UserProfile implements IEngUserProfile {
private Collection functionalities = null;
private String defaultRole = null;
private String organization = null;
private Boolean isSuperadmin = null;


private SpagoBIUserProfile spagoBIUserProfile = null;

/**
Expand All @@ -59,6 +62,7 @@ public UserProfile(SpagoBIUserProfile profile) {
this.userName = profile.getUserName();
this.userId = profile.getUserId();
this.organization = profile.getOrganization();
this.isSuperadmin = profile.getIsSuperadmin();
roles = new ArrayList();
if (profile.getRoles() != null) {
int l = profile.getRoles().length;
Expand Down Expand Up @@ -102,7 +106,7 @@ public UserProfile(String userUniqueIdentifier, String userId, String userName,
this.userName = userName;
this.organization = organization;
}

public UserProfile(String userId, String organization) {
this.userUniqueIdentifier = userId;
this.userId = userId;
Expand Down Expand Up @@ -402,7 +406,14 @@ public SpagoBIUserProfile getSpagoBIUserProfile() {
public void setSpagoBIUserProfile(SpagoBIUserProfile spagoBIUserProfile) {
this.spagoBIUserProfile = spagoBIUserProfile;
}

public Boolean getIsSuperadmin() {
return isSuperadmin;
}

public void setIsSuperadmin(Boolean isSuperadmin) {
this.isSuperadmin = isSuperadmin;
}
/**
* To be user by external engines ONLY.
* The user identifier must match this syntax:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,10 @@ public class SpagoBIConstants {
public static final String SUBOBJECT = "SUBOBJECT";

//constants for user profiles
//---superadmin functionalities
public static final String TENANT_MANAGEMENT = "TenantManagement";
public static final String ENGINES_MANAGEMENT = "EnginesManagement";
//---end
public static final String DATASET_MANAGEMENT = "DatasetManagement";
public static final String FUNCTIONALITIES_MANAGEMENT = "FunctionalitiesManagement";
public static final String LOVS_MANAGEMENT = "LovsManagement";
Expand Down Expand Up @@ -374,6 +377,9 @@ public class SpagoBIConstants {
public static final String SEE_TODO_LIST = "SeeToDoList";
public static final String CREATE_DOCUMENT = "CreateDocument";




public static final String DOCUMENT_MOVE_DOWN_STATE = "DocumentMoveDownState" ;
public static final String DOCUMENT_MOVE_UP_STATE = "DocumentMoveUpState" ;
//for management of DOCUMENT COMPOSITION
Expand Down
Loading

0 comments on commit c320931

Please sign in to comment.