Commit 3dee5684 authored by Bas Lijnse's avatar Bas Lijnse

Fixed bug in process db for access to open parallel sets.

git-svn-id: https://svn.cs.ru.nl/repos/iTask-system/trunk@1176 63da3aa8-80fd-4f01-9db8-e6ea747a3da2
parent 6d843498
......@@ -71,14 +71,13 @@ where
getProcessForUser :: !User !TaskId !*IWorld -> (!Maybe Process,!*IWorld)
getProcessForUser user taskId iworld
# (procs,iworld) = processStore id iworld
# users = [p.Process.properties.managerProperties.ManagerProperties.worker \\ p <- procs | relevantProc taskId p]
= case [p \\ p <- procs | p.Process.taskId == taskId && isMember user users] of
= case [p\\ p <- procs | p.Process.taskId == taskId
&& (user == p.Process.properties.managerProperties.ManagerProperties.worker
|| isMember user (map snd p.Process.properties.systemProperties.SystemProperties.subTaskWorkers)
)] of
[entry] = (Just entry, iworld)
_ = (Nothing, iworld)
where
relevantProc targetId {Process|taskId} = taskId == targetId
relevantProc _ _ = False
getProcessForManager :: !User !TaskId !*IWorld -> (!Maybe Process, !*IWorld)
getProcessForManager manager taskId iworld
# (procs,iworld) = processStore id iworld
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment