henning 2003/02/18 07:53:47
Modified: src/java/org/apache/turbine/services/security
TurbineSecurity.java
Log:
convenience method analog createPermission to create a new role
Revision Changes Path
1.12 +17 -1
jakarta-turbine-2/src/java/org/apache/turbine/services/security/TurbineSecurity.java
Index: TurbineSecurity.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/security/TurbineSecurity.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- TurbineSecurity.java 18 Feb 2003 15:51:16 -0000 1.11
+++ TurbineSecurity.java 18 Feb 2003 15:53:47 -0000 1.12
@@ -627,6 +627,22 @@
}
/**
+ * Creates a new Role in the system. This is a convenience
+ * method.
+ *
+ * @param name The name of the Role.
+ *
+ * @return An object representing the new Role.
+ *
+ * @throws TurbineSecurityException if the Role could not be created.
+ */
+ public static Role createRole(String name)
+ throws TurbineSecurityException
+ {
+ return getService().addRole(getNewRole(name));
+ }
+
+ /**
* Retrieve a Group object with specified name.
*
* @param groupName The name of the Group to be retrieved.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]