-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added security for Category agents and fixed agent configuration. #56
- Loading branch information
1 parent
ed0f3f5
commit 8eeac0b
Showing
10 changed files
with
106 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
notesInstallation=/Applications/HCL Notes.app/Contents/MacOS/ | ||
server=demo/DEMO | ||
server=demo.startcloud.com/STARTcloud | ||
dbName=SuperHumanPortal.nsf | ||
agentPropertiesDir=agentProperties/ |
25 changes: 22 additions & 3 deletions
25
Super.Human.Portal_Agents/src/main/java/CategoryAgents/CategoryCreate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,28 @@ | ||
package CategoryAgents; | ||
|
||
import java.util.Collection; | ||
|
||
import com.moonshine.domino.security.SecurityInterface; | ||
|
||
import auth.RoleRestrictedAgent; | ||
import auth.SecurityBuilder; | ||
import auth.SimpleRoleSecurity; | ||
|
||
/** | ||
* Modify this class for custom changes to the agent. | ||
*/ | ||
public class CategoryCreate extends CategoryCreateBase { | ||
|
||
// No modifications by default | ||
public class CategoryCreate extends CategoryCreateBase implements RoleRestrictedAgent { | ||
|
||
public Collection<String> getAllowedRoles() { | ||
return SecurityBuilder.buildList(SimpleRoleSecurity.ROLE_ALL); | ||
} | ||
|
||
public SecurityInterface checkSecurity() { | ||
return getSecurity(); | ||
} | ||
|
||
@Override | ||
protected SecurityInterface createSecurityInterface() { | ||
return SecurityBuilder.buildInstance(agentDatabase, this, session, getLog()); | ||
} | ||
} |
25 changes: 22 additions & 3 deletions
25
Super.Human.Portal_Agents/src/main/java/CategoryAgents/CategoryDelete.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,28 @@ | ||
package CategoryAgents; | ||
|
||
import java.util.Collection; | ||
|
||
import com.moonshine.domino.security.SecurityInterface; | ||
|
||
import auth.RoleRestrictedAgent; | ||
import auth.SecurityBuilder; | ||
import auth.SimpleRoleSecurity; | ||
|
||
/** | ||
* Modify this class for custom changes to the agent. | ||
*/ | ||
public class CategoryDelete extends CategoryDeleteBase { | ||
|
||
// No modifications by default | ||
public class CategoryDelete extends CategoryDeleteBase implements RoleRestrictedAgent { | ||
|
||
public Collection<String> getAllowedRoles() { | ||
return SecurityBuilder.buildList(SimpleRoleSecurity.ROLE_ALL); | ||
} | ||
|
||
public SecurityInterface checkSecurity() { | ||
return getSecurity(); | ||
} | ||
|
||
@Override | ||
protected SecurityInterface createSecurityInterface() { | ||
return SecurityBuilder.buildInstance(agentDatabase, this, session, getLog()); | ||
} | ||
} |
33 changes: 30 additions & 3 deletions
33
Super.Human.Portal_Agents/src/main/java/CategoryAgents/CategoryRead.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,36 @@ | ||
package CategoryAgents; | ||
|
||
import java.util.Collection; | ||
|
||
import com.moonshine.domino.security.SecurityInterface; | ||
|
||
import auth.RoleRestrictedAgent; | ||
import auth.SecurityBuilder; | ||
import auth.SimpleRoleSecurity; | ||
import lotus.domino.NotesException; | ||
import lotus.domino.View; | ||
|
||
/** | ||
* Modify this class for custom changes to the agent. | ||
*/ | ||
public class CategoryRead extends CategoryReadBase { | ||
|
||
// No modifications by default | ||
public class CategoryRead extends CategoryReadBase implements RoleRestrictedAgent { | ||
|
||
public Collection<String> getAllowedRoles() { | ||
return SecurityBuilder.buildList(SimpleRoleSecurity.ROLE_ALL); | ||
} | ||
|
||
public SecurityInterface checkSecurity() { | ||
return getSecurity(); | ||
} | ||
|
||
@Override | ||
protected SecurityInterface createSecurityInterface() { | ||
return SecurityBuilder.buildInstance(agentDatabase, this, session, getLog()); | ||
} | ||
|
||
|
||
@Override | ||
protected View getLookupView() throws NotesException { | ||
return agentDatabase.getView("Categories/Ordered"); // use sorting | ||
} | ||
} |
25 changes: 22 additions & 3 deletions
25
Super.Human.Portal_Agents/src/main/java/CategoryAgents/CategoryUpdate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,28 @@ | ||
package CategoryAgents; | ||
|
||
import java.util.Collection; | ||
|
||
import com.moonshine.domino.security.SecurityInterface; | ||
|
||
import auth.RoleRestrictedAgent; | ||
import auth.SecurityBuilder; | ||
import auth.SimpleRoleSecurity; | ||
|
||
/** | ||
* Modify this class for custom changes to the agent. | ||
*/ | ||
public class CategoryUpdate extends CategoryUpdateBase { | ||
|
||
// No modifications by default | ||
public class CategoryUpdate extends CategoryUpdateBase implements RoleRestrictedAgent { | ||
|
||
public Collection<String> getAllowedRoles() { | ||
return SecurityBuilder.buildList(SimpleRoleSecurity.ROLE_ALL); | ||
} | ||
|
||
public SecurityInterface checkSecurity() { | ||
return getSecurity(); | ||
} | ||
|
||
@Override | ||
protected SecurityInterface createSecurityInterface() { | ||
return SecurityBuilder.buildInstance(agentDatabase, this, session, getLog()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters