Remove the hack in HTML viewer's ObjectView#execute() w.r.t. ImmutableFacet
---------------------------------------------------------------------------

                 Key: ISIS-148
                 URL: https://issues.apache.org/jira/browse/ISIS-148
             Project: Isis
          Issue Type: Improvement
          Components: Viewer: HTML
    Affects Versions: 0.1.2-incubating
            Reporter: Dan Haywood
            Priority: Minor
             Fix For: 0.2.0-incubating


        if (isEditable) {
            // TODO: this test should be done by the ImmutableFacetFactory 
installing an immutableFacet on every
            // member
            final boolean immutable =
                ImmutableFacetUtils.isAlwaysImmutable(specification)
                    || (adapter.isPersistent() && 
ImmutableFacetUtils.isImmutableOncePersisted(specification));

            boolean allFieldUneditable = true;
            final List<ObjectAssociation> flds = 
specification.getAssociations();
            for (int i = 0; i < flds.size(); i++) {
                if (flds.get(i).isVisible(authenticationSession, 
adapter).isAllowed() && flds.get(i).isUsable(authenticationSession, 
adapter).isAllowed()) {
                    allFieldUneditable = false;
                    break;
                }
            }
            if (!immutable && !allFieldUneditable) {
                content.add(context.getComponentFactory().createEditOption(id));
            }
        }


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to