Package org.exist.security

Examples of org.exist.security.Account.addGroup()


    final NodeList gl = node.getChildNodes();
    Node group;
    for (int i = 0; i < gl.getLength(); i++) {
      group = gl.item(i);
      if (group.getNodeType() == Node.ELEMENT_NODE && group.getLocalName().equals(GROUP))
        {new_account.addGroup(group.getFirstChild().getNodeValue());}
    }
   
    return new_account;
  }
 
View Full Code Here


                    }

                    if(!manager.hasGroup(groupName)){
                        manager.addGroup(groupName);
                    }
                    u.addGroup(groupName);
                }
            }
           
            manager.addAccount(u);
           
View Full Code Here

            executeWithBroker(new BrokerOperation<Void>() {
                @Override
                public Void withBroker(final DBBroker broker) throws EXistException, PermissionDeniedException {
                    final SecurityManager sm = broker.getBrokerPool().getSecurityManager();
                    final Account account = sm.getAccount(accountName);
                    account.addGroup(groupName);
                    sm.updateAccount(account);
                   
                    return null;
                }
            });
View Full Code Here

            u = manager.getAccount(name);
          }

          for (final String g : groups) {
            if (!u.hasGroup(g)) {
              u.addGroup(g);
            }
          }

          return manager.updateAccount(u);
         
View Full Code Here

            final Group group = sm.getGroup(groupName);

            final Account account = sm.getAccount(userName);
            if(account != null) {
                account.addGroup(group);
               
                //TEMP - ESCALATE TO DBA :-(
                /**
                 * Security Manager has a fundamental flaw
                 * Group Membership is stored in the Account XML: so you cannot
View Full Code Here

            executeWithBroker(new BrokerOperation<Void>(){
                @Override
                public Void withBroker(final DBBroker broker) throws XMLDBException, LockException, PermissionDeniedException, IOException, EXistException, TriggerException, SyntaxException {
                    final SecurityManager sm = broker.getBrokerPool().getSecurityManager();
                    final Account account = sm.getAccount(accountName);
                    account.addGroup(groupName);
                    sm.updateAccount(account);
                   
                    return null;
                }
            });
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.