Class Users

java.lang.Object
org.basex.core.users.Users

public final class Users extends Object
This class organizes all users.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Constructor Details

    • Users

      public Users(StaticOptions sopts)
      Constructor for global users.
      Parameters:
      sopts - static options
  • Method Details

    • write

      public void write()
      Writes permissions to disk.
    • add

      public void add(User user)
      Adds a user.
      Parameters:
      user - user to be added
    • alter

      public void alter(User user, String name)
      Renames a user.
      Parameters:
      user - user reference
      name - new name
    • drop

      public boolean drop(User user)
      Drops a user from the list.
      Parameters:
      user - user reference
      Returns:
      success flag
    • get

      public User get(String name)
      Returns user with the specified name.
      Parameters:
      name - user name
      Returns:
      user name or null
    • find

      public String[] find(Pattern pattern)
      Returns all user names that match the specified pattern.
      Parameters:
      pattern - glob pattern
      Returns:
      user list
    • info

      public Table info(String db, Context ctx)
      Returns table with all users, or users from a specific database. The list will only contain the current user if no admin permissions are available.
      Parameters:
      db - database (can be null)
      ctx - database context
      Returns:
      user information
    • users

      public ArrayList<User> users(String db, Context ctx)
      Returns all users, or users that have permissions for a specific database. The list will only contain the current user if no admin permissions are available.
      Parameters:
      db - database (can be null)
      ctx - database context
      Returns:
      user information
    • info

      public ANode info()
      Returns the info element.
      Returns:
      info element (can be null)
    • info

      public void info(ANode elem)
      Sets the info element.
      Parameters:
      elem - info element