incubator-hise-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r.@apache.org
Subject svn commit: r915778 - in /incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine: DefaultHISEUserDetails.java jaxws/TaskOperationsImpl.java
Date Wed, 24 Feb 2010 13:18:37 GMT
Author: rr
Date: Wed Feb 24 13:18:37 2010
New Revision: 915778

URL: http://svn.apache.org/viewvc?rev=915778&view=rev
Log:
HISE-25: Authorization update

Modified:
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/DefaultHISEUserDetails.java
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsImpl.java

Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/DefaultHISEUserDetails.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/DefaultHISEUserDetails.java?rev=915778&r1=915777&r2=915778&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/DefaultHISEUserDetails.java
(original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/DefaultHISEUserDetails.java
Wed Feb 24 13:18:37 2010
@@ -40,15 +40,17 @@
 
     public String getUserPassword(String user1) {
         OrgEntity user = hiseDao.find(OrgEntity.class, user1);
-        return user.getUserPassword();
+        return user == null ? null : user.getUserPassword();
     }
     
     public Collection<String> getUserGroups(String user1) {
         OrgEntity user = hiseDao.find(OrgEntity.class, user1);
         Collection<String> r = new ArrayList<String>();
-        for (OrgEntity g : user.getUserGroups()) {
-            Validate.isTrue(g.getType() == OrgEntityType.GROUP);
-            r.add(g.getName());
+        if (user != null) {
+	        for (OrgEntity g : user.getUserGroups()) {
+	            Validate.isTrue(g.getType() == OrgEntityType.GROUP);
+	            r.add(g.getName());
+	        }
         }
         return r;
     }

Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsImpl.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsImpl.java?rev=915778&r1=915777&r2=915778&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsImpl.java
(original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsImpl.java
Wed Feb 24 13:18:37 2010
@@ -321,6 +321,7 @@
 
     public void forward(String identifier, TOrganizationalEntity organizationalEntity) throws
IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
         Task t = Task.load(hiseEngine, Long.parseLong(identifier));
+        t.setCurrentUser(loadUser());
         t.forward(organizationalEntity);
     }
 
@@ -346,6 +347,7 @@
 
     public Object getInput(String identifier, String part) throws IllegalAccessFault, IllegalStateFault,
IllegalArgumentFault {
         Task t = Task.load(hiseEngine, Long.parseLong(identifier));
+        t.setCurrentUser(getUserString());
         return t.getInput(part);
     }
 
@@ -381,12 +383,14 @@
 
     public void remove(String identifier) throws IllegalAccessFault, IllegalArgumentFault
{
         Task t = Task.load(hiseEngine, Long.parseLong(identifier));
+        t.setCurrentUser(getUserString());
         t.remove();
     }
 
     public void resume(String identifier) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault
{
 //        OrgEntity user = loadUser();
         Task t = Task.load(hiseEngine, Long.parseLong(identifier));
+        t.setCurrentUser(getUserString());
         t.resume();
     }
 
@@ -416,16 +420,19 @@
 
     public void stop(String identifier) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault
{
         Task t = Task.load(hiseEngine, Long.parseLong(identifier));
+        t.setCurrentUser(getUserString());
         t.stop();
     }
 
     public void suspend(String identifier) throws IllegalAccessFault, IllegalStateFault,
IllegalArgumentFault {
         Task t = Task.load(hiseEngine, Long.parseLong(identifier));
+        t.setCurrentUser(getUserString());
         t.suspend();
     }
 
     public void suspendUntil(String identifier, TTime time) throws IllegalAccessFault, IllegalStateFault,
IllegalArgumentFault {
         Task t = Task.load(hiseEngine, Long.parseLong(identifier));
+        t.setCurrentUser(getUserString());
         Date when = time.getPointOfTime();
         if (when == null) {
             Duration when2 = time.getTimePeriod();



Mime
View raw message