Package com.orientechnologies.orient.core.metadata.security

Examples of com.orientechnologies.orient.core.metadata.security.OUser


            }
          }
        }
      } else
        // REMOTE CREATE DUMMY USER
        user = new OUser(iUserName, OUser.encryptPassword(iUserPassword)).addRole(new ORole("passthrough", null,
            ORole.ALLOW_MODES.ALLOW_ALL_BUT));

      checkSecurity(ODatabaseSecurityResources.DATABASE, ORole.PERMISSION_READ);

      if (!metadata.getSchema().existsClass(OMVRBTreeRIDProvider.PERSISTENT_CLASS_NAME))
View Full Code Here


       throw new ODatabaseException("Database '" + iDatabase.getURL() + "' already exists");

     iDatabase.create();
     if (dbUser != null) {

       OUser oUser = iDatabase.getMetadata().getSecurity().getUser(dbUser);
       if (oUser == null) {
         iDatabase.getMetadata().getSecurity().createUser(dbUser, dbPasswd, new String[] { ORole.ADMIN });
       } else {
         oUser.setPassword(dbPasswd);
         oUser.save();
       }
     }

     OLogManager.instance().info(this, "Created database '%s' of type '%s'", iDatabase.getName(),
         iDatabase.getStorage() instanceof OAbstractPaginatedStorage ? iDatabase.getStorage().getType() : "memory");
View Full Code Here

TOP

Related Classes of com.orientechnologies.orient.core.metadata.security.OUser

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.