taylor 2004/07/14 20:54:10
Modified: src/java/org/apache/jetspeed/om/dbregistry
SecurityDbEntryPeer.java
Log:
fixing bug to support owner only type of allows
CVS: ----------------------------------------------------------------------
CVS: PR:
CVS: If this change addresses a PR in the problem report tracking
CVS: database, then enter the PR number(s) here.
CVS: Obtained from:
CVS: If this change has been taken from another system, such as NCSA,
CVS: then name the system in this line, otherwise delete it.
CVS: Submitted by:
CVS: If this code has been contributed to Apache by someone else; i.e.,
CVS: they sent us a patch or a new module, then include their name/email
CVS: address here. If this is your work then delete this line.
CVS: Reviewed by:
CVS: If we are doing pre-commit code reviews and someone else has
CVS: reviewed your changes, include their name(s) here.
CVS: If you have not had it reviewed then delete this line.
Revision Changes Path
1.5 +10 -2
jakarta-jetspeed/src/java/org/apache/jetspeed/om/dbregistry/SecurityDbEntryPeer.java
Index: SecurityDbEntryPeer.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/om/dbregistry/SecurityDbEntryPeer.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- SecurityDbEntryPeer.java 15 Jul 2004 02:27:06 -0000 1.4
+++ SecurityDbEntryPeer.java 15 Jul 2004 03:54:10 -0000 1.5
@@ -26,6 +26,7 @@
import org.apache.jetspeed.om.registry.SecurityEntry;
import org.apache.jetspeed.om.registry.base.BaseSecurityAccess;
import org.apache.jetspeed.om.registry.base.BaseSecurityAllow;
+import org.apache.jetspeed.om.registry.base.BaseSecurityAllowOwner;
import org.apache.jetspeed.om.registry.base.BaseSecurityEntry;
import org.apache.jetspeed.services.logging.JetspeedLogFactoryService;
import org.apache.jetspeed.services.logging.JetspeedLogger;
@@ -199,30 +200,37 @@
while (allows.hasNext())
{
SecurityAllowDbEntry sa = (SecurityAllowDbEntry)allows.next();
- SecurityAllow allow = new BaseSecurityAllow(sa.getId());
if (sa.getAllowType().equals(ALLOW_OWNER))
{
+ SecurityAllow allow = new BaseSecurityAllowOwner(sa.getId());
allow.setOwner(true);
access.getOwnerAllows().add(allow);
}
else if (sa.getAllowType().equals(ALLOW_BOTH))
{
+ SecurityAllow allow = new BaseSecurityAllow(sa.getId());
+
allow.setRole(sa.getAllowValue());
allow.setGroup(sa.getAllowGroup());
access.getAllows().add(allow);
}
else if (sa.getAllowType().equals(ALLOW_ROLE))
{
+ SecurityAllow allow = new BaseSecurityAllow(sa.getId());
+
allow.setRole(sa.getAllowValue());
access.getAllows().add(allow);
}
else if (sa.getAllowType().equals(ALLOW_GROUP))
{
+ SecurityAllow allow = new BaseSecurityAllow(sa.getId());
+
allow.setGroup(sa.getAllowValue());
access.getAllows().add(allow);
}
else
{
+ SecurityAllow allow = new BaseSecurityAllow(sa.getId());
allow.setUser(sa.getAllowValue());
access.getAllows().add(allow);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]