|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.sconman.PermissionAggregator
class PermissionAggregator
Field Summary | |
---|---|
(package private) java.util.List |
permissions
The list of permissions |
(package private) SecurityContext |
sctx
The securoty context |
Constructor Summary | |
---|---|
PermissionAggregator(SecurityContext sctx)
Main constructor |
Method Summary | |
---|---|
void |
addAddNewPermission(User actor,
ContentType ctype)
Adds permissions to create new contents of given content type. |
void |
addAdminProjectPermission(User actor)
Adds permissions to admin project. |
void |
addDeletePermission(User actor,
ContentType ctype)
Adds permissions to do delete contents of given content type. |
void |
addModifyPermission(User actor,
Category cat)
Adds permissions to modify a category |
void |
addModifyPermission(User actor,
ContentType ctype)
Adds permissions to modify contents of given content type. |
(package private) void |
addPermission(Permission permission)
|
(package private) void |
addPermission(java.lang.String permission)
|
(package private) void |
addPermissions(java.lang.String permission)
|
void |
addViewPermission(User actor,
Category cat)
Adds a permission to view a category |
void |
addViewPermission(User actor,
ContentType ctype)
Adds permissions to view contents of given content type. |
(package private) java.util.List |
getPermissions()
Return the role permissions |
(package private) java.lang.String |
getPermissionsAsString()
Return the role permissions, as a CSV String |
boolean |
hasAddNewPermission(ContentType ctype)
Checks whether the aggregator can create new contents of the given type |
boolean |
hasAdminProjectPermission()
Checks that the user can manage the project (Manage Roles and Users) |
boolean |
hasDeletePermission(Category cat)
Checks whether the aggregator can remove a category |
boolean |
hasDeletePermission(ContentType ctype)
Checks whether the aggregator can delete that content type |
boolean |
hasModifyPermission(Category cat)
Checks whether the aggregator can modify a category |
boolean |
hasModifyPermission(ContentType ctype)
Checks whether the aggregator can modify that content type |
(package private) boolean |
hasPermission(Permission permission)
|
(package private) boolean |
hasPermission(java.lang.String permission)
|
boolean |
hasViewPermission(Category cat)
Checks whether the aggregator can view a category |
boolean |
hasViewPermission(ContentType ctype)
Checks whether the aggregator can view that content type |
void |
removeAddNewPermission(User actor,
ContentType ctype)
Removes permissions to create new contents of given content type. |
void |
removeAdminProjectPermission(User actor)
Removes permission to admin project. |
(package private) void |
removeAllPermissions()
|
void |
removeAllPermissions(User actor)
Removes all the Permissions |
void |
removeDeletePermission(User actor,
ContentType ctype)
Removes permissions to do delete contents of given content type. |
void |
removeModifyPermission(User actor,
Category cat)
Removes permissions to modify a category |
void |
removeModifyPermission(User actor,
ContentType ctype)
Removes permissions to modify contents of given content type. |
(package private) void |
removePermission(Permission permission)
|
(package private) void |
removePermission(java.lang.String permission)
|
void |
removeViewPermission(User actor,
Category cat)
Removes a permission to view a category |
void |
removeViewPermission(User actor,
ContentType ctype)
Removes permissions to view contents of given content type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
SecurityContext sctx
java.util.List permissions
Constructor Detail |
---|
PermissionAggregator(SecurityContext sctx)
sctx
- id
- Method Detail |
---|
public void addViewPermission(User actor, Category cat) throws SCMSecurityException
actor
- The user that performs the actioncat
- The category that the user must view
SCMSecurityException
- Thrown when the actor cannot modify
permissionspublic void removeViewPermission(User actor, Category cat) throws SCMSecurityException
actor
- The user that performs the actioncat
- The category that the user must view
SCMSecurityException
- Thrown when the actor cannot modify
permissionspublic void addModifyPermission(User actor, Category cat) throws SCMSecurityException
actor
- The user that performs the actioncat
- The category that the user must modify Category
SCMSecurityException
- Thrown when the actor cannot modify
permissionspublic void removeModifyPermission(User actor, Category cat) throws SCMSecurityException
actor
- The user that performs the actioncat
- The category that the user must modify Category
SCMSecurityException
- Thrown when the actor cannot modify
permissionspublic void addAddNewPermission(User actor, ContentType ctype) throws SCMSecurityException
actor
- ctype
-
SCMSecurityException
public void removeAddNewPermission(User actor, ContentType ctype) throws SCMSecurityException
actor
- ctype
-
SCMSecurityException
public void addViewPermission(User actor, ContentType ctype) throws SCMSecurityException
actor
- ctype
-
SCMSecurityException
public void removeViewPermission(User actor, ContentType ctype) throws SCMSecurityException
actor
- ctype
-
SCMSecurityException
public void addModifyPermission(User actor, ContentType ctype) throws SCMSecurityException
actor
- ctype
-
SCMSecurityException
public void removeModifyPermission(User actor, ContentType ctype) throws SCMSecurityException
actor
- ctype
-
SCMSecurityException
public void addDeletePermission(User actor, ContentType ctype) throws SCMSecurityException
actor
- ctype
-
SCMSecurityException
public void removeDeletePermission(User actor, ContentType ctype) throws SCMSecurityException
actor
- ctype
-
SCMSecurityException
public void addAdminProjectPermission(User actor) throws SCMSecurityException
actor
- User who gives Permission
SCMSecurityException
public void removeAdminProjectPermission(User actor) throws SCMSecurityException
actor
- User who removes Permission
SCMSecurityException
public boolean hasAdminProjectPermission()
public boolean hasViewPermission(Category cat)
cat
-
public boolean hasModifyPermission(Category cat)
cat
-
public boolean hasDeletePermission(Category cat)
cat
-
public boolean hasViewPermission(ContentType ctype)
ctype
- ctypePermissions
-
SCMSecurityException
public boolean hasModifyPermission(ContentType ctype)
ctype
- ctypePermissions
-
SCMSecurityException
public boolean hasDeletePermission(ContentType ctype)
ctype
- ctypePermissions
-
SCMSecurityException
public boolean hasAddNewPermission(ContentType ctype)
ctype
- ctypePermissions
-
SCMSecurityException
public void removeAllPermissions(User actor) throws SCMSecurityException
actor
- User who removes all the permissions.
SCMSecurityException
void removeAllPermissions()
void addPermission(Permission permission)
void removePermission(Permission permission)
void addPermission(java.lang.String permission)
void addPermissions(java.lang.String permission)
void removePermission(java.lang.String permission)
boolean hasPermission(java.lang.String permission)
boolean hasPermission(Permission permission)
java.util.List getPermissions()
java.lang.String getPermissionsAsString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |