-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/shibui-2394' of bitbucket.org:unicon/shib-idp-u…
…i into feature/shibui-2394
- Loading branch information
Showing
7 changed files
with
70 additions
and
3 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
...va/edu/internet2/tier/shibboleth/admin/ui/security/permission/IPersistentEntityTuple.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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package edu.internet2.tier.shibboleth.admin.ui.security.permission; | ||
|
||
import java.io.Serializable; | ||
|
||
/** | ||
* Will be used as a key for PersmissionEvaluator return types | ||
*/ | ||
public interface IPersistentEntityTuple extends Serializable { | ||
/** | ||
* Returns the database id of the database-entity. The id may originally be string, int, long, etc - it will be up to implementing | ||
* code to correctly hand the id based on the type of entity when using the id to fetch. | ||
* @return String the id of the entity. | ||
*/ | ||
String getId(); | ||
|
||
/** | ||
* The persistant entity type associated with the id | ||
* @return the class of the database entity that the id is associated with | ||
*/ | ||
Class getType(); | ||
|
||
} |
24 changes: 24 additions & 0 deletions
24
...du/internet2/tier/shibboleth/admin/ui/security/permission/IShibUiPermissionEvaluator.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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package edu.internet2.tier.shibboleth.admin.ui.security.permission; | ||
|
||
import org.springframework.security.access.PermissionEvaluator; | ||
import org.springframework.security.core.Authentication; | ||
|
||
import java.util.Collection; | ||
import java.util.Map; | ||
|
||
public interface IShibUiPermissionEvaluator extends PermissionEvaluator { | ||
// | ||
// /** | ||
// * For a given permission, find all the persistant entities a user has rights to. | ||
// */ | ||
// Collection getPersistentEntitiesWithPermission(Authentication authentication, Object permission); | ||
// | ||
// /** | ||
// * Get ALL persistent entities that user has access to | ||
// * @param authentication | ||
// * @return a map. The key value will be the entity tuple and the value portions will be the set of permissions a user has on those objects | ||
// */ | ||
// Map<IPersistentEntityTuple, Object> getPersistentEntities(Authentication authentication); | ||
|
||
Collection getPersistentEntities(Authentication authentication, ShibUiType type, PermissionType permissionType); | ||
} |
5 changes: 5 additions & 0 deletions
5
.../main/java/edu/internet2/tier/shibboleth/admin/ui/security/permission/PermissionType.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package edu.internet2.tier.shibboleth.admin.ui.security.permission; | ||
|
||
public enum PermissionType { | ||
admin, enable, approver, user; | ||
} |
4 changes: 4 additions & 0 deletions
4
...c/main/java/edu/internet2/tier/shibboleth/admin/ui/security/permission/ShibUiService.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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package edu.internet2.tier.shibboleth.admin.ui.security.permission; | ||
|
||
public class ShibUiService { | ||
} |
5 changes: 5 additions & 0 deletions
5
.../src/main/java/edu/internet2/tier/shibboleth/admin/ui/security/permission/ShibUiType.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package edu.internet2.tier.shibboleth.admin.ui.security.permission; | ||
|
||
public enum ShibUiType { | ||
approvable, entityDescriptor | ||
} |
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