Package org.onesocialweb.model.acl

Examples of org.onesocialweb.model.acl.AclRule


  }

  @Override
  public boolean equals(Object obj) {
    if (obj instanceof AclRule) {
      AclRule rule = (AclRule) obj;
      return actions.equals(rule.getActions())
          && subjects.equals(rule.getSubjects());
    } else {
      return false;
    }
  }
View Full Code Here


  }

  private boolean canSee(String fromJID, ActivityEntry entry, String viewer) throws UserNotFoundException  {
    // Get a view action
    final AclAction viewAction = aclFactory.aclAction(AclAction.ACTION_VIEW, AclAction.PERMISSION_GRANT);
    AclRule rule = null;
    for (AclRule aclRule : entry.getAclRules()) {
      if (aclRule.hasAction(viewAction)) {
        rule = aclRule;
        break;
      }
View Full Code Here

    for (String recipient : shoutAttachmentPanel.getRecipients()) {
      entry.addRecipient(atomFactory.reply(null, recipient, null, null));
    }

    // setup access control
    AclRule rule = service.getAclFactory().aclRule();
    rule.addAction(service.getAclFactory().aclAction(AclAction.ACTION_VIEW,
        AclAction.PERMISSION_GRANT));

    // check privacy settings
    String visibilityValue = privacyAttachmentPanel.getPrivacyValue();

    if (visibilityValue.equals(uiText.Everyone())) {
      rule.addSubject(service.getAclFactory().aclSubject(null,
          AclSubject.EVERYONE));
    } else {
      rule.addSubject(service.getAclFactory().aclSubject(visibilityValue,
          AclSubject.GROUP));
    }
    entry.addAclRule(rule);

    // we got everything we need -> clean up UI
View Full Code Here

TOP

Related Classes of org.onesocialweb.model.acl.AclRule

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.