Work on Finish the "drools-framewok-uberfire-security-service" module #97
Allow only users with a user group that gives access to the Workbench #96
This commit is contained in:
parent
f23eec8ec3
commit
3f1187921e
18 changed files with 416 additions and 131 deletions
|
|
@ -34,6 +34,7 @@ public class ProjectPersist implements Serializable {
|
|||
@DBRef
|
||||
private KieWorkbench kieWorkbench;
|
||||
|
||||
|
||||
private KieProject projectName;
|
||||
|
||||
private String mainClass;
|
||||
|
|
@ -179,6 +180,18 @@ public class ProjectPersist implements Serializable {
|
|||
this.serverNames = serverNames;
|
||||
}
|
||||
|
||||
public String getWorkspaceName(){
|
||||
if (this.projectName!= null){
|
||||
return projectName.getSpaceName();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public String getKieProjectName(){
|
||||
if (this.projectName!= null){
|
||||
return projectName.getName()+"-"+this.branch;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public ProjectPersist duplicate(){
|
||||
ArrayList<String> listServerNames = new ArrayList<String>();
|
||||
listServerNames.addAll(serverNames);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package org.chtijbug.drools.proxy.persistence.model;
|
|||
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.mongodb.core.index.Indexed;
|
||||
import org.springframework.data.mongodb.core.mapping.DBRef;
|
||||
import org.springframework.data.mongodb.core.mapping.Document;
|
||||
|
||||
@Document
|
||||
|
|
@ -16,7 +17,14 @@ public class UserGroups {
|
|||
@Indexed
|
||||
private String projectName;
|
||||
|
||||
@DBRef
|
||||
private KieWorkbench kieWorkbench;
|
||||
|
||||
@DBRef
|
||||
private ProjectPersist projectPersist;
|
||||
|
||||
@DBRef
|
||||
private UserGroups workspaceUserGroup;
|
||||
|
||||
public UserGroups() {
|
||||
}
|
||||
|
|
@ -58,4 +66,28 @@ public class UserGroups {
|
|||
this.projectName = projectName;
|
||||
}
|
||||
|
||||
public KieWorkbench getKieWorkbench() {
|
||||
return kieWorkbench;
|
||||
}
|
||||
|
||||
public void setKieWorkbench(KieWorkbench kieWorkbench) {
|
||||
this.kieWorkbench = kieWorkbench;
|
||||
}
|
||||
|
||||
public ProjectPersist getProjectPersist() {
|
||||
return projectPersist;
|
||||
}
|
||||
|
||||
public void setProjectPersist(ProjectPersist projectPersist) {
|
||||
this.projectPersist = projectPersist;
|
||||
}
|
||||
|
||||
public UserGroups getWorkspaceUserGroup() {
|
||||
return workspaceUserGroup;
|
||||
}
|
||||
|
||||
public void setWorkspaceUserGroup(UserGroups workspaceUserGroup) {
|
||||
this.workspaceUserGroup = workspaceUserGroup;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package org.chtijbug.drools.proxy.persistence.repository;
|
||||
|
||||
import org.chtijbug.drools.proxy.persistence.model.ProjectPersist;
|
||||
import org.chtijbug.drools.proxy.persistence.model.UserGroups;
|
||||
import org.springframework.data.mongodb.repository.MongoRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
|
@ -9,4 +10,6 @@ public interface UserGroupsRepository extends MongoRepository<UserGroups, String
|
|||
|
||||
UserGroups findByName(String login);
|
||||
UserGroups findByID(String login);
|
||||
|
||||
UserGroups findUserGroupsByProjectPersist(ProjectPersist projectPersist);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
editor.link_modal.header
Reference in a new issue