summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2013-07-23 05:51:19 (EDT)
committerStephan Born2013-09-23 04:55:13 (EDT)
commit3d972b2f19d80df4432a26454cbc434b3e3e658f (patch)
tree910c0331a5fa0d41d0cc3c786a12867b612843de
parent63e2682a4fe2093d35ff550ff69ad56b23333676 (diff)
downloadorg.eclipse.stardust.ui.web-3d972b2f19d80df4432a26454cbc434b3e3e658f.zip
org.eclipse.stardust.ui.web-3d972b2f19d80df4432a26454cbc434b3e3e658f.tar.gz
org.eclipse.stardust.ui.web-3d972b2f19d80df4432a26454cbc434b3e3e658f.tar.bz2
Jira-ID: CRNT-27605
Added filter to getTeamQuery() for admin return all users in Deputy search i.e excludeFilterForAdmin = true git-svn-id: https://svn.csa.sungard.com/repos/ipp2/product/trunk/stardust/ui.web@66192 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b Signed-off-by: Sidharth Singh <sidharth.singh@sungard.com>
-rw-r--r--business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/WorkflowFacade.java19
-rw-r--r--business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/views/DeputyTeamMemberBean.java2
2 files changed, 19 insertions, 2 deletions
diff --git a/business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/WorkflowFacade.java b/business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/WorkflowFacade.java
index bbfcb6b..306de9d 100644
--- a/business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/WorkflowFacade.java
+++ b/business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/WorkflowFacade.java
@@ -1167,10 +1167,27 @@ public class WorkflowFacade implements Resetable
public UserQuery getTeamQuery(boolean includeTeamLeader)
{
+ return getTeamQuery(includeTeamLeader, false);
+ }
+
+ /**
+ * For deputy, if user is Admin, all users should be visible
+ *
+ * @param includeTeamLeader
+ * @param excludeFilterForAdmin
+ * @return
+ */
+ public UserQuery getTeamQuery(boolean includeTeamLeader, boolean excludeFilterForAdmin)
+ {
UserQuery query = UserQuery.findActive();
User user = getLoginUser();
if (user != null)
- {
+ {
+ if (excludeFilterForAdmin && user.isAdministrator())
+ {
+ // Deputy- For Admin user, return all users
+ return query;
+ }
FilterTerm filter = query.getFilter().addOrTerm();
ModelParticipantInfo modelParticipantInfo;
diff --git a/business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/views/DeputyTeamMemberBean.java b/business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/views/DeputyTeamMemberBean.java
index 3d02b1d..8a2593d 100644
--- a/business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/views/DeputyTeamMemberBean.java
+++ b/business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/views/DeputyTeamMemberBean.java
@@ -190,7 +190,7 @@ public class DeputyTeamMemberBean extends UIComponentBean implements ViewEventHa
{
myTeamMemberList = new ArrayList<DeputyTableEntry>();
- UserQuery userQuery = facade.getTeamQuery(false);
+ UserQuery userQuery = facade.getTeamQuery(false, true);
userQuery.setPolicy(new UserDetailsPolicy(UserDetailsLevel.Full));
userQuery.orderBy(UserQuery.LAST_NAME)
.and(UserQuery.FIRST_NAME)