summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2013-08-02 06:44:02 (EDT)
committer Stephan Born2013-09-23 04:57:37 (EDT)
commit5da6530f02c37a4b918ad685c8d5a6586911450b (patch)
tree7d6019427cf6ca9c84d6ea71edb31215991a8c36
parenta8faadf085b462abba263c9ae394ea127836fdea (diff)
downloadorg.eclipse.stardust.ui.web-5da6530f02c37a4b918ad685c8d5a6586911450b.zip
org.eclipse.stardust.ui.web-5da6530f02c37a4b918ad685c8d5a6586911450b.tar.gz
org.eclipse.stardust.ui.web-5da6530f02c37a4b918ad685c8d5a6586911450b.tar.bz2
Jira-ID: CRNT-29403
Added logic for saving Allow/Deny for AccessControlBean on securityDialog.java/org/eclipse/stardust/ui/web/viewscommon/security/SecurityDialog.java. git-svn-id: https://svn.csa.sungard.com/repos/ipp2/product/trunk/stardust/ui.web@66452 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b Signed-off-by: Sidharth Singh <sidharth.singh@sungard.com>
-rw-r--r--views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/security/AccessControlBean.java122
-rw-r--r--views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/security/SecurityDialog.java141
-rw-r--r--views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/DMSHelper.java20
-rw-r--r--views-common/src/main/resources/META-INF/xhtml/security/securityDialogColumns.xhtml208
-rw-r--r--views-common/src/main/resources/views-common-messages_en.properties1
5 files changed, 282 insertions, 210 deletions
diff --git a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/security/AccessControlBean.java b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/security/AccessControlBean.java
index d7a39f0..55ba991 100644
--- a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/security/AccessControlBean.java
+++ b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/security/AccessControlBean.java
@@ -24,17 +24,17 @@ public class AccessControlBean extends DefaultRowModel
private Participant participant;
- private boolean read;
+ private String read;
- private boolean modify;
+ private String modify;
- private boolean create;
+ private String create;
- private boolean delete;
+ private String delete;
- private boolean readAcl;
+ private String readAcl;
- private boolean modifyAcl;
+ private String modifyAcl;
private boolean edit;
@@ -57,6 +57,8 @@ public class AccessControlBean extends DefaultRowModel
public static final String ALLOW = "Allow";
public static final String DENY = "Deny";
+
+ public static final String INHERIT = "Inherit";
public static final String CREATE = "Create";
@@ -87,22 +89,22 @@ public class AccessControlBean extends DefaultRowModel
return participant;
}
- public boolean isRead()
+ public String getRead()
{
return read;
}
- public boolean isModify()
+ public String getModify()
{
return modify;
}
- public boolean isCreate()
+ public String getCreate()
{
return create;
}
- public boolean isDelete()
+ public String getDelete()
{
return delete;
}
@@ -112,17 +114,16 @@ public class AccessControlBean extends DefaultRowModel
super();
this.participant = participant;
setModelLabel();
- setRead(false);
- setModify(false);
- setCreate(false);
- setDelete(false);
- setReadAcl(false);
- setModifyAcl(false);
- setNewOrModified(true);
+ setRead(INHERIT);
+ setModify(INHERIT);
+ setCreate(INHERIT);
+ setDelete(INHERIT);
+ setReadAcl(INHERIT);
+ setModifyAcl(INHERIT);
}
- public AccessControlBean(Participant participant, boolean read, boolean modify,
- boolean create, boolean delete, boolean readAcl, boolean modifyAcl)
+ public AccessControlBean(Participant participant, String read, String modify,
+ String create, String delete, String readAcl, String modifyAcl)
{
super();
this.participant = participant;
@@ -133,7 +134,6 @@ public class AccessControlBean extends DefaultRowModel
setDelete(delete);
setReadAcl(readAcl);
setModifyAcl(modifyAcl);
- setNewOrModified(true);
}
private void setModelLabel()
@@ -146,12 +146,12 @@ public class AccessControlBean extends DefaultRowModel
}
}
- public boolean isReadAcl()
+ public String getReadAcl()
{
return readAcl;
}
- public boolean isModifyAcl()
+ public String getModifyAcl()
{
return modifyAcl;
}
@@ -169,92 +169,50 @@ public class AccessControlBean extends DefaultRowModel
this.participant = participant;
}
- public void setRead(boolean read)
+ public void setRead(String read)
{
this.read = read;
- if (this.read)
- {
- this.readPolicyChangedValue = ALLOW;
- }
- else
- {
- this.readPolicyChangedValue = DENY;
- }
+ this.readPolicyChangedValue = read;
}
- public void setModify(boolean modify)
+ public void setModify(String modify)
{
this.modify = modify;
- if (this.modify)
- {
- this.modifyPolicyChangedValue = ALLOW;
- }
- else
- {
- this.modifyPolicyChangedValue = DENY;
- }
+ this.modifyPolicyChangedValue = modify;
}
- public void setCreate(boolean create)
+ public void setCreate(String create)
{
this.create = create;
- if (this.create)
- {
- this.createPolicyChangedValue = ALLOW;
- }
- else
- {
- this.createPolicyChangedValue = DENY;
- }
+ this.createPolicyChangedValue = create;
}
- public void setDelete(boolean delete)
+ public void setDelete(String delete)
{
this.delete = delete;
- if (this.delete)
- {
- this.deletePolicyChangedValue = ALLOW;
- }
- else
- {
- this.deletePolicyChangedValue = DENY;
- }
+ this.deletePolicyChangedValue = delete;
}
- public void setReadAcl(boolean readAcl)
+ public void setReadAcl(String readAcl)
{
this.readAcl = readAcl;
- if (this.readAcl)
- {
- this.readACLPolicyChangedValue = ALLOW;
- }
- else
- {
- this.readACLPolicyChangedValue = DENY;
- }
+ this.readACLPolicyChangedValue = readAcl;
}
- public void setModifyAcl(boolean modifyAcl)
+ public void setModifyAcl(String modifyAcl)
{
this.modifyAcl = modifyAcl;
- if (this.modifyAcl)
- {
- this.modifyACLPolicyChangedValue = ALLOW;
- }
- else
- {
- this.modifyACLPolicyChangedValue = DENY;
- }
+ this.modifyACLPolicyChangedValue = modifyAcl;
}
public void setAllPrivilege()
{
- setRead(true);
- setModify(true);
- setCreate(true);
- setDelete(true);
- setReadAcl(true);
- setModifyAcl(true);
+ setRead(ALLOW);
+ setModify(ALLOW);
+ setCreate(ALLOW);
+ setDelete(ALLOW);
+ setReadAcl(ALLOW);
+ setModifyAcl(ALLOW);
}
public boolean isNewOrModified()
diff --git a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/security/SecurityDialog.java b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/security/SecurityDialog.java
index 65ae788..d5c18f5 100644
--- a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/security/SecurityDialog.java
+++ b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/security/SecurityDialog.java
@@ -25,6 +25,7 @@ import javax.faces.model.SelectItem;
import org.eclipse.stardust.engine.api.model.QualifiedModelParticipantInfo;
import org.eclipse.stardust.engine.api.runtime.AccessControlEntry;
+import org.eclipse.stardust.engine.api.runtime.AccessControlEntry.EntryType;
import org.eclipse.stardust.engine.api.runtime.AccessControlPolicy;
import org.eclipse.stardust.engine.api.runtime.DocumentManagementService;
import org.eclipse.stardust.engine.api.runtime.Privilege;
@@ -43,10 +44,12 @@ import org.eclipse.stardust.ui.web.common.message.MessageDialog;
import org.eclipse.stardust.ui.web.common.table.DataTableRowSelector;
import org.eclipse.stardust.ui.web.common.table.SortableTable;
import org.eclipse.stardust.ui.web.common.table.SortableTableComparator;
+import org.eclipse.stardust.ui.web.common.util.CollectionUtils;
import org.eclipse.stardust.ui.web.common.util.StringUtils;
import org.eclipse.stardust.ui.web.viewscommon.core.CommonProperties;
import org.eclipse.stardust.ui.web.viewscommon.core.ResourcePaths;
import org.eclipse.stardust.ui.web.viewscommon.docmgmt.ParametricCallbackHandler;
+import org.eclipse.stardust.ui.web.viewscommon.messages.MessagesViewsCommonBean;
import org.eclipse.stardust.ui.web.viewscommon.services.ContextPortalServices;
import org.eclipse.stardust.ui.web.viewscommon.utils.DMSHelper;
import org.eclipse.stardust.ui.web.viewscommon.utils.ModelUtils;
@@ -66,12 +69,15 @@ public class SecurityDialog extends PopupUIComponentBean
private SortableTable<AccessControlBean> securityDialogInheritedTable;
private boolean expanded;
private boolean policyChanged = false;
+ private boolean allInheritPolicy = true;
private Map<String, QualifiedModelParticipantInfo> allParticipants;
+ private final MessagesViewsCommonBean COMMON_MESSAGE_BEAN = MessagesViewsCommonBean.getInstance();
public List<SelectItem> getPermission()
{
List<SelectItem> list = new ArrayList<SelectItem>();
+ list.add(new SelectItem(AccessControlBean.INHERIT,getMessages().getString("securityDialog.columnValue.inherit")));
list.add(new SelectItem(AccessControlBean.ALLOW,getMessages().getString("securityDialog.columnValue.allow")));
list.add(new SelectItem(AccessControlBean.DENY,getMessages().getString("securityDialog.columnValue.deny")));
return list;
@@ -187,7 +193,9 @@ public class SecurityDialog extends PopupUIComponentBean
*/
protected void addParticipant(Participant selectedParticipant)
{
- AccessControlBean acb = new AccessControlBean(selectedParticipant, true, true, true, true, true, true);
+ AccessControlBean acb = new AccessControlBean(selectedParticipant, AccessControlBean.INHERIT,
+ AccessControlBean.INHERIT, AccessControlBean.INHERIT, AccessControlBean.INHERIT, AccessControlBean.INHERIT,
+ AccessControlBean.INHERIT);
if (!getAccessControlBean().contains(acb))
{
acb.setEdit(true);
@@ -223,8 +231,11 @@ public class SecurityDialog extends PopupUIComponentBean
public List<AccessControlBean> generateACBList(Set<AccessControlPolicy> policies, boolean inheritedList)
{
+ Map<String,AccessControlBean> participantAccessControlMap = CollectionUtils.newHashMap();
List<AccessControlBean> acbs = new ArrayList<AccessControlBean>();
Iterator<AccessControlPolicy> effectivePoliciesIter = policies.iterator();
+ AccessControlBean acb = null;
+ boolean updateACBList = true;
while (effectivePoliciesIter.hasNext())
{
AccessControlPolicy acp = effectivePoliciesIter.next();
@@ -232,11 +243,19 @@ public class SecurityDialog extends PopupUIComponentBean
while (aceIter.hasNext())
{
AccessControlEntry ace = aceIter.next();
- AccessControlBean acb = null;
try
{
- acb = new AccessControlBean(new Participant(ace.getPrincipal(), allParticipants.get(ace.getPrincipal()
- .getName())));
+ if (null != acb && participantAccessControlMap.containsKey(ace.getPrincipal().getName()))
+ {
+ acb = participantAccessControlMap.get(ace.getPrincipal().getName());
+ updateACBList = false;
+ }
+ else
+ {
+ acb = new AccessControlBean(new Participant(ace.getPrincipal(), allParticipants.get(ace
+ .getPrincipal().getName())));
+ participantAccessControlMap.put(acb.getParticipant().getPrincipal().getName(),acb);
+ }
}
catch (Exception e)
{
@@ -257,43 +276,58 @@ public class SecurityDialog extends PopupUIComponentBean
{
if (privilege.equals(DmsPrivilege.CREATE_PRIVILEGE))
{
- acb.setCreate(true);
+ acb.setCreate(true == ace.getType().toString().equals(AccessControlBean.ALLOW.toUpperCase())
+ ? AccessControlBean.ALLOW
+ : AccessControlBean.DENY);
}
if (privilege.equals(DmsPrivilege.DELETE_PRIVILEGE))
{
- acb.setDelete(true);
+ acb.setDelete(ace.getType().toString().equals(AccessControlBean.ALLOW.toUpperCase())
+ ? AccessControlBean.ALLOW
+ : AccessControlBean.DENY);
}
if (privilege.equals(DmsPrivilege.MODIFY_PRIVILEGE))
{
- acb.setModify(true);
+ acb.setModify(ace.getType().toString().equals(AccessControlBean.ALLOW.toUpperCase())
+ ? AccessControlBean.ALLOW
+ : AccessControlBean.DENY);
}
if (privilege.equals(DmsPrivilege.READ_PRIVILEGE))
{
- acb.setRead(true);
+ acb.setRead(ace.getType().toString().equals(AccessControlBean.ALLOW.toUpperCase())
+ ? AccessControlBean.ALLOW
+ : AccessControlBean.DENY);
}
if (privilege.equals(DmsPrivilege.READ_ACL_PRIVILEGE))
{
- acb.setReadAcl(true);
+ acb.setReadAcl(ace.getType().toString().equals(AccessControlBean.ALLOW.toUpperCase())
+ ? AccessControlBean.ALLOW
+ : AccessControlBean.DENY);
}
if (privilege.equals(DmsPrivilege.MODIFY_ACL_PRIVILEGE))
{
- acb.setModifyAcl(true);
+ acb.setModifyAcl(ace.getType().toString().equals(AccessControlBean.ALLOW.toUpperCase())
+ ? AccessControlBean.ALLOW
+ : AccessControlBean.DENY);
}
}
}
acb.setEdit(false);
if (inheritedList)
{
- if (!checkIfInherited(acb))
+ if (!checkIfInherited(acb) && updateACBList)
{
acbs.add(acb);
}
}
else
{
- acbs.add(acb);
+ if (updateACBList)
+ {
+ acbs.add(acb);
+ }
}
- }
+ }
}
return acbs;
}
@@ -314,6 +348,23 @@ public class SecurityDialog extends PopupUIComponentBean
return false;
}
+ private boolean checkAllRolesInherit(AccessControlBean acb)
+ {
+ if (!isLeaf && AccessControlBean.INHERIT.equals(acb.getCreate()))
+ return false;
+ else if (!AccessControlBean.INHERIT.equals(acb.getModify()))
+ return false;
+ else if (!AccessControlBean.INHERIT.equals(acb.getModify()))
+ return false;
+ else if (!AccessControlBean.INHERIT.equals(acb.getDelete()))
+ return false;
+ else if (!AccessControlBean.INHERIT.equals(acb.getReadAcl()))
+ return false;
+ else if (!AccessControlBean.INHERIT.equals(acb.getModifyAcl()))
+ return false;
+ return true;
+ }
+
public void save()
{
apply();
@@ -322,6 +373,15 @@ public class SecurityDialog extends PopupUIComponentBean
public void apply()
{
+ for (int i = 0; i < accessControlBean.size(); i++)
+ {
+ AccessControlBean objAcb = accessControlBean.get(i);
+ if (checkAllRolesInherit(objAcb))
+ {
+ allInheritPolicy = true;
+ return;
+ }
+ }
DocumentManagementService dms = ContextPortalServices.getDocumentManagementService();
// TODO Delete the print line after perfecting the functionality
// printDmsSecurity(dms, getResourceId());
@@ -349,6 +409,7 @@ public class SecurityDialog extends PopupUIComponentBean
trace.error(e);
}
next.removeAllAccessControlEntries();
+
for (AccessControlBean acb : accessControlBean)
{
if (CommonProperties.ADMINISTRATOR.equals(acb.getParticipant().getId()))
@@ -361,37 +422,44 @@ public class SecurityDialog extends PopupUIComponentBean
{
acb.setEdit(false);
acb.setNewOrModified(false);
- if (acb.isCreate())
+ if (!acb.getCreate().equals(AccessControlBean.INHERIT))
{
next.addAccessControlEntry(acb.getParticipant().getPrincipal(),
- Collections.<Privilege> singleton(DmsPrivilege.CREATE_PRIVILEGE));
+ Collections.<Privilege> singleton(DmsPrivilege.CREATE_PRIVILEGE),
+ acb.getCreate().toUpperCase().equals(EntryType.ALLOW.toString()) ? EntryType.ALLOW : EntryType.DENY);
}
- if (acb.isDelete())
+ if (!acb.getDelete().equals(AccessControlBean.INHERIT))
{
next.addAccessControlEntry(acb.getParticipant().getPrincipal(),
- Collections.<Privilege> singleton(DmsPrivilege.DELETE_PRIVILEGE));
+ Collections.<Privilege> singleton(DmsPrivilege.DELETE_PRIVILEGE),
+ acb.getDelete().toUpperCase().equals(EntryType.ALLOW.toString()) ? EntryType.ALLOW : EntryType.DENY);
next.addAccessControlEntry(acb.getParticipant().getPrincipal(),
- Collections.<Privilege> singleton(DmsPrivilege.DELETE_CHILDREN_PRIVILEGE));
+ Collections.<Privilege> singleton(DmsPrivilege.DELETE_CHILDREN_PRIVILEGE),
+ acb.getDelete().toUpperCase().equals(EntryType.ALLOW.toString()) ? EntryType.ALLOW : EntryType.DENY);
}
- if (acb.isModify())
+ if (!acb.getModify().equals(AccessControlBean.INHERIT))
{
next.addAccessControlEntry(acb.getParticipant().getPrincipal(),
- Collections.<Privilege> singleton(DmsPrivilege.MODIFY_PRIVILEGE));
+ Collections.<Privilege> singleton(DmsPrivilege.MODIFY_PRIVILEGE),
+ acb.getModify().toUpperCase().equals(EntryType.ALLOW.toString()) ? EntryType.ALLOW : EntryType.DENY);
}
- if (acb.isRead())
+ if (!acb.getRead().equals(AccessControlBean.INHERIT))
{
next.addAccessControlEntry(acb.getParticipant().getPrincipal(),
- Collections.<Privilege> singleton(DmsPrivilege.READ_PRIVILEGE));
+ Collections.<Privilege> singleton(DmsPrivilege.READ_PRIVILEGE),
+ acb.getRead().toUpperCase().equals(EntryType.ALLOW.toString()) ? EntryType.ALLOW : EntryType.DENY);
}
- if (acb.isReadAcl())
+ if (!acb.getReadAcl().equals(AccessControlBean.INHERIT))
{
next.addAccessControlEntry(acb.getParticipant().getPrincipal(),
- Collections.<Privilege> singleton(DmsPrivilege.READ_ACL_PRIVILEGE));
+ Collections.<Privilege> singleton(DmsPrivilege.READ_ACL_PRIVILEGE),
+ acb.getReadAcl().toUpperCase().equals(EntryType.ALLOW.toString()) ? EntryType.ALLOW : EntryType.DENY);
}
- if (acb.isModifyAcl())
+ if (!acb.getModifyAcl().equals(AccessControlBean.INHERIT))
{
next.addAccessControlEntry(acb.getParticipant().getPrincipal(),
- Collections.<Privilege> singleton(DmsPrivilege.MODIFY_ACL_PRIVILEGE));
+ Collections.<Privilege> singleton(DmsPrivilege.MODIFY_ACL_PRIVILEGE),
+ acb.getModifyAcl().toUpperCase().equals(EntryType.ALLOW.toString()) ? EntryType.ALLOW : EntryType.DENY);
}
}
}
@@ -437,15 +505,7 @@ public class SecurityDialog extends PopupUIComponentBean
}
if (!(((String) event.getNewValue()).equals((String) event.getOldValue())))
{
- boolean newValue = false;
- if (((String) event.getNewValue()).equals(AccessControlBean.ALLOW))
- {
- newValue = true;
- }
- else if (((String) event.getNewValue()).equals(AccessControlBean.DENY))
- {
- newValue = false;
- }
+ String newValue = (String) event.getNewValue();
if (property.equals(AccessControlBean.CREATE))
{
acb.setCreate(newValue);
@@ -474,10 +534,12 @@ public class SecurityDialog extends PopupUIComponentBean
}
for (int i = 0; i < accessControlBean.size(); i++)
{
- if (accessControlBean.get(i).getParticipant().getId().equals(acb.getParticipant().getId()))
+ AccessControlBean objAcb = accessControlBean.get(i);
+ if (objAcb.getParticipant().getId().equals(acb.getParticipant().getId()))
{
accessControlBean.remove(i);
accessControlBean.add(i, acb);
+ allInheritPolicy = checkAllRolesInherit(acb);
}
}
securityDialogTable.setList(accessControlBean);
@@ -745,4 +807,11 @@ public class SecurityDialog extends PopupUIComponentBean
{
return isModifyACL() && getSelectedRowCount() > 0;
}
+
+ public boolean isAllInheritPolicy()
+ {
+ return allInheritPolicy;
+ }
+
+
} \ No newline at end of file
diff --git a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/DMSHelper.java b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/DMSHelper.java
index e60956d..ba55a59 100644
--- a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/DMSHelper.java
+++ b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/DMSHelper.java
@@ -381,17 +381,25 @@ public class DMSHelper
{
if (isSecurityEnabled())
{
- DocumentManagementService dms = ContextPortalServices
- .getDocumentManagementService();
- if (dms.getPrivileges(resourceID).contains(privilege)
- || dms.getPrivileges(resourceID).contains(DmsPrivilege.ALL_PRIVILEGES))
+ DocumentManagementService dms = ContextPortalServices.getDocumentManagementService();
+ try
{
- return true;
+ if ((dms.getPrivileges(resourceID).contains(privilege))
+ || dms.getPrivileges(resourceID).contains(DmsPrivilege.ALL_PRIVILEGES))
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
}
- else
+ catch (Exception e)
{
+ //TODO- review the same after CRNT-29870 is resolved
return false;
}
+
}
else
{
diff --git a/views-common/src/main/resources/META-INF/xhtml/security/securityDialogColumns.xhtml b/views-common/src/main/resources/META-INF/xhtml/security/securityDialogColumns.xhtml
index 0fc45bc..5a8f47f 100644
--- a/views-common/src/main/resources/META-INF/xhtml/security/securityDialogColumns.xhtml
+++ b/views-common/src/main/resources/META-INF/xhtml/security/securityDialogColumns.xhtml
@@ -26,25 +26,30 @@
<ice:panelGroup
rendered="#{col.columnName == 'Create'}">
- <ice:panelGroup>
- <ice:panelGrid columns="2" rendered="#{!row.edit}">
+ <ice:panelGroup rendered="#{!row.edit}">
+ <ice:panelGrid columns="2" rendered="#{row.create == 'Inherit'}">
<ice:graphicImage
- value="/plugins/views-common/images/icons/status.png"
- rendered="#{row.create}" />
+ value="/plugins/views-common/images/icons/status-offline.png" />
<ice:outputText
- value="#{securityDialog.messages['securityDialog.columnValue.allow']}"
- rendered="#{row.create}" />
+ value="#{securityDialog.messages['securityDialog.columnValue.inherit']}" />
+ </ice:panelGrid>
+ <ice:panelGrid columns="2" rendered="#{row.create =='Allow'}">
+ <ice:graphicImage
+ value="/plugins/views-common/images/icons/status.png" />
+ <ice:outputText
+ value="#{securityDialog.messages['securityDialog.columnValue.allow']}" />
+ </ice:panelGrid>
+ <ice:panelGrid columns="2" rendered="#{row.create =='Deny'}">
<ice:graphicImage
- value="/plugins/views-common/images/icons/status-busy.png"
- rendered="#{!row.create}" />
+ value="/plugins/views-common/images/icons/status-busy.png" />
<ice:outputText
- value="#{securityDialog.messages['securityDialog.columnValue.deny']}"
- rendered="#{!row.create}" />
+ value="#{securityDialog.messages['securityDialog.columnValue.deny']}" />
</ice:panelGrid>
- <ice:panelGroup rendered="#{row.edit}">
+ </ice:panelGroup>
+ <ice:panelGroup rendered="#{row.edit}">
<ice:selectOneMenu onclick="Event.stop(event);"
valueChangeListener="#{securityDialog.policyChanged}"
- partialSubmit="true" value="#{row.createPolicyChangedValue}">
+ partialSubmit="true" immediate ="true" value="#{row.createPolicyChangedValue}">
<pc:automationTag
value="auto-COM-SecurityDlg-SecurityDlgTbl-Create"
standAlone="false" />
@@ -53,28 +58,33 @@
<f:attribute name="property" value="Create" />
</ice:selectOneMenu>
</ice:panelGroup>
- </ice:panelGroup>
</ice:panelGroup>
<ice:panelGroup rendered="#{col.columnName == 'Read'}">
- <ice:panelGrid columns="2" rendered="#{!row.edit}">
- <ice:graphicImage
- value="/plugins/views-common/images/icons/status.png"
- rendered="#{row.read}" />
- <ice:outputText
- value="#{securityDialog.messages['securityDialog.columnValue.allow']}"
- rendered="#{row.read}" />
- <ice:graphicImage
- value="/plugins/views-common/images/icons/status-busy.png"
- rendered="#{!row.read}" />
- <ice:outputText
- value="#{securityDialog.messages['securityDialog.columnValue.deny']}"
- rendered="#{!row.read}" />
- </ice:panelGrid>
+ <ice:panelGroup rendered="#{!row.edit}">
+ <ice:panelGrid columns="2" rendered="#{row.read == 'Inherit'}">
+ <ice:graphicImage
+ value="/plugins/views-common/images/icons/status-offline.png" />
+ <ice:outputText
+ value="#{securityDialog.messages['securityDialog.columnValue.inherit']}" />
+ </ice:panelGrid>
+ <ice:panelGrid columns="2" rendered="#{row.read == 'Allow'}">
+ <ice:graphicImage
+ value="/plugins/views-common/images/icons/status.png" />
+ <ice:outputText
+ value="#{securityDialog.messages['securityDialog.columnValue.allow']}" />
+ </ice:panelGrid>
+ <ice:panelGrid columns="2" rendered="#{row.read == 'Deny'}">
+ <ice:graphicImage
+ value="/plugins/views-common/images/icons/status-busy.png" />
+ <ice:outputText
+ value="#{securityDialog.messages['securityDialog.columnValue.deny']}" />
+ </ice:panelGrid>
+ </ice:panelGroup>
<ice:panelGroup rendered="#{row.edit}">
<ice:selectOneMenu onclick="Event.stop(event);"
valueChangeListener="#{securityDialog.policyChanged}"
- partialSubmit="true" value="#{row.readPolicyChangedValue}">
+ partialSubmit="true" immediate ="true" value="#{row.readPolicyChangedValue}">
<pc:automationTag value="auto-COM-SecurityDlg-SecurityDlgTbl-Read"
standAlone="false" />
<f:selectItems value="#{securityDialog.permission}" />
@@ -85,20 +95,26 @@
</ice:panelGroup>
<ice:panelGroup rendered="#{col.columnName == 'Modify'}">
- <ice:panelGrid columns="2" rendered="#{!row.edit}">
- <ice:graphicImage
- value="/plugins/views-common/images/icons/status.png"
- rendered="#{row.modify}" />
- <ice:outputText
- value="#{securityDialog.messages['securityDialog.columnValue.allow']}"
- rendered="#{row.modify}" />
- <ice:graphicImage
- value="/plugins/views-common/images/icons/status-busy.png"
- rendered="#{!row.modify}" />
- <ice:outputText
- value="#{securityDialog.messages['securityDialog.columnValue.deny']}"
- rendered="#{!row.modify}" />
- </ice:panelGrid>
+ <ice:panelGroup rendered="#{!row.edit}">
+ <ice:panelGrid columns="2" rendered="#{row.modify == 'Inherit'}">
+ <ice:graphicImage
+ value="/plugins/views-common/images/icons/status-offline.png" />
+ <ice:outputText
+ value="#{securityDialog.messages['securityDialog.columnValue.inherit']}" />
+ </ice:panelGrid>
+ <ice:panelGrid columns="2" rendered="#{row.modify == 'Allow'}">
+ <ice:graphicImage
+ value="/plugins/views-common/images/icons/status.png" />
+ <ice:outputText
+ value="#{securityDialog.messages['securityDialog.columnValue.allow']}" />
+ </ice:panelGrid>
+ <ice:panelGrid columns="2" rendered="#{row.modify == 'Deny'}">
+ <ice:graphicImage
+ value="/plugins/views-common/images/icons/status-busy.png" />
+ <ice:outputText
+ value="#{securityDialog.messages['securityDialog.columnValue.deny']}" />
+ </ice:panelGrid>
+ </ice:panelGroup>
<ice:panelGroup rendered="#{row.edit}">
<ice:selectOneMenu onclick="Event.stop(event);"
valueChangeListener="#{securityDialog.policyChanged}"
@@ -114,20 +130,26 @@
</ice:panelGroup>
<ice:panelGroup rendered="#{col.columnName == 'Delete'}">
- <ice:panelGrid columns="2" rendered="#{!row.edit}">
- <ice:graphicImage
- value="/plugins/views-common/images/icons/status.png"
- rendered="#{row.delete}" />
- <ice:outputText
- value="#{securityDialog.messages['securityDialog.columnValue.allow']}"
- rendered="#{row.delete}" />
- <ice:graphicImage
- value="/plugins/views-common/images/icons/status-busy.png"
- rendered="#{!row.delete}" />
- <ice:outputText
- value="#{securityDialog.messages['securityDialog.columnValue.deny']}"
- rendered="#{!row.delete}" />
- </ice:panelGrid>
+ <ice:panelGroup rendered="#{!row.edit}">
+ <ice:panelGrid columns="2" rendered="#{row.delete == 'Inherit'}">
+ <ice:graphicImage
+ value="/plugins/views-common/images/icons/status-offline.png" />
+ <ice:outputText
+ value="#{securityDialog.messages['securityDialog.columnValue.inherit']}" />
+ </ice:panelGrid>
+ <ice:panelGrid columns="2" rendered="#{row.delete == 'Allow'}">
+ <ice:graphicImage
+ value="/plugins/views-common/images/icons/status.png" />
+ <ice:outputText
+ value="#{securityDialog.messages['securityDialog.columnValue.allow']}" />
+ </ice:panelGrid>
+ <ice:panelGrid columns="2" rendered="#{row.delete == 'Deny'}">
+ <ice:graphicImage
+ value="/plugins/views-common/images/icons/status-busy.png" />
+ <ice:outputText
+ value="#{securityDialog.messages['securityDialog.columnValue.deny']}" />
+ </ice:panelGrid>
+ </ice:panelGroup>
<ice:panelGroup rendered="#{row.edit}">
<ice:selectOneMenu onclick="Event.stop(event);"
valueChangeListener="#{securityDialog.policyChanged}"
@@ -143,20 +165,26 @@
</ice:panelGroup>
<ice:panelGroup rendered="#{col.columnName == 'ReadACL'}">
- <ice:panelGrid columns="2" rendered="#{!row.edit}">
- <ice:graphicImage
- value="/plugins/views-common/images/icons/status.png"
- rendered="#{row.readAcl}" />
- <ice:outputText
- value="#{securityDialog.messages['securityDialog.columnValue.allow']}"
- rendered="#{row.readAcl}" />
- <ice:graphicImage
- value="/plugins/views-common/images/icons/status-busy.png"
- rendered="#{!row.readAcl}" />
- <ice:outputText
- value="#{securityDialog.messages['securityDialog.columnValue.deny']}"
- rendered="#{!row.readAcl}" />
- </ice:panelGrid>
+ <ice:panelGroup rendered="#{!row.edit}">
+ <ice:panelGrid columns="2" rendered="#{row.readAcl == 'Inherit'}">
+ <ice:graphicImage
+ value="/plugins/views-common/images/icons/status-offline.png" />
+ <ice:outputText
+ value="#{securityDialog.messages['securityDialog.columnValue.inherit']}" />
+ </ice:panelGrid>
+ <ice:panelGrid columns="2" rendered="#{row.readAcl =='Allow'}">
+ <ice:graphicImage
+ value="/plugins/views-common/images/icons/status.png" />
+ <ice:outputText
+ value="#{securityDialog.messages['securityDialog.columnValue.allow']}" />
+ </ice:panelGrid>
+ <ice:panelGrid columns="2" rendered="#{row.readAcl =='Deny'}">
+ <ice:graphicImage
+ value="/plugins/views-common/images/icons/status-busy.png" />
+ <ice:outputText
+ value="#{securityDialog.messages['securityDialog.columnValue.deny']}" />
+ </ice:panelGrid>
+ </ice:panelGroup>
<ice:panelGroup rendered="#{row.edit}">
<ice:selectOneMenu onclick="Event.stop(event);"
valueChangeListener="#{securityDialog.policyChanged}"
@@ -172,20 +200,28 @@
</ice:panelGroup>
<ice:panelGroup rendered="#{col.columnName == 'ModifyACL'}">
- <ice:panelGrid columns="2" rendered="#{!row.edit}">
- <ice:graphicImage
- value="/plugins/views-common/images/icons/status.png"
- rendered="#{row.modifyAcl}" />
- <ice:outputText
- value="#{securityDialog.messages['securityDialog.columnValue.allow']}"
- rendered="#{row.modifyAcl}" />
- <ice:graphicImage
- value="/plugins/views-common/images/icons/status-busy.png"
- rendered="#{!row.modifyAcl}" />
- <ice:outputText
- value="#{securityDialog.messages['securityDialog.columnValue.deny']}"
- rendered="#{!row.modifyAcl}" />
- </ice:panelGrid>
+ <ice:panelGroup rendered="#{!row.edit}">
+ <ice:panelGrid columns="2" rendered="#{row.modifyAcl == 'Inherit'}">
+ <ice:graphicImage
+ value="/plugins/views-common/images/icons/status-offline.png" />
+
+ <ice:outputText
+ value="#{securityDialog.messages['securityDialog.columnValue.inherit']}" />
+
+ </ice:panelGrid>
+ <ice:panelGrid columns="2" rendered="#{row.modifyAcl =='Allow'}">
+ <ice:graphicImage
+ value="/plugins/views-common/images/icons/status.png" />
+ <ice:outputText
+ value="#{securityDialog.messages['securityDialog.columnValue.allow']}" />
+ </ice:panelGrid>
+ <ice:panelGrid columns="2" rendered="#{row.modifyAcl =='Deny'}">
+ <ice:graphicImage
+ value="/plugins/views-common/images/icons/status-busy.png" />
+ <ice:outputText
+ value="#{securityDialog.messages['securityDialog.columnValue.deny']}" />
+ </ice:panelGrid>
+ </ice:panelGroup>
<ice:panelGroup rendered="#{row.edit}">
<ice:selectOneMenu onclick="Event.stop(event);"
valueChangeListener="#{securityDialog.policyChanged}"
@@ -202,11 +238,11 @@
<ice:panelGroup rendered="#{col.columnName == 'Actions'}">
<ice:commandLink value="#{views_common_msgPropsBean['common.edit']}" styleClass="action-link" disabled="#{!securityDialog.modifyACL}"
- actionListener="#{row.editClicked}" style="padding-right:15px;" onclick="Event.stop(event);">
+ actionListener="#{row.editClicked}" style="padding-right:15px;" >
<pc:automationTag value="auto-COM-SecurityDlg-SecurityDlgTbl-ActionsEdit" standAlone="false"/>
</ice:commandLink>
<ice:commandLink value="#{views_common_msgPropsBean['common.remove']}" styleClass="action-link" disabled="#{!securityDialog.modifyACL}"
- actionListener="#{securityDialog.removeRole}" style="padding-right:15px;" onclick="Event.stop(event);">
+ actionListener="#{securityDialog.removeRole}" style="padding-right:15px;" >
<pc:automationTag value="auto-COM-SecurityDlg-SecurityDlgTbl-ActionsRemove" standAlone="false"/>
<f:attribute name="acb" value="#{row}" />
</ice:commandLink>
diff --git a/views-common/src/main/resources/views-common-messages_en.properties b/views-common/src/main/resources/views-common-messages_en.properties
index 94cbc8d..4ff11dc 100644
--- a/views-common/src/main/resources/views-common-messages_en.properties
+++ b/views-common/src/main/resources/views-common-messages_en.properties
@@ -269,6 +269,7 @@ views.myDocumentsTreeView.securityDialog.participantPopup.button.select=Select
views.myDocumentsTreeView.securityDialog.participantPopup.button.cancel=Cancel
views.myDocumentsTreeView.securityDialog.columnValue.allow=Allow
views.myDocumentsTreeView.securityDialog.columnValue.deny=Deny
+views.myDocumentsTreeView.securityDialog.columnValue.inherit=---
views.myDocumentsTreeView.securityDialog.configurationException=Document repository is not enabled to configure security. Please contact your Administrator.
views.myDocumentsTreeView.securityDialog.configurationFolderException=Security cannot be configured on the selected node.
views.myDocumentsTreeView.securityDialog.everyone =Everyone