Package ghidra.framework.remote

# Class User

java.lang.Object
ghidra.framework.remote.User

All Implemented Interfaces:
  `Serializable`, `Comparable<User>`

public class User extends Object implements Comparable<User>, Serializable
Container class for the user name and the permission type: READ_ONLY, WRITE, or ADMIN.

See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `ADMIN`
  Value corresponding to Administrative permission for a repository user.
  `static final String`
  `ANONYMOUS_USERNAME`
  Name associated with anonymous user
  `static final int`
  `READ_ONLY`
  Value corresponding to Read-only permission for a repository user.
  `static final long`
  `serialVersionUID`
  `static final int`
  `WRITE`
  Value corresponding to Write permission for a repository user.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `User(String name, int permission)`
  Constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `compareTo(User other)`
  `boolean`
  `equals(Object obj)`
  `String`
  `getName()`
  Returns user id/name
  `int`
  `getPermissionType()`
  Returns the permission value assigned this user.
  `int`
  `hashCode()`
  `boolean`
  `hasWritePermission()`
  Return true if this user has permission of WRITE or ADMIN.
  `boolean`
  `isAdmin()`
  Returns true if permission is ADMIN.
  `boolean`
  `isReadOnly()`
  Returns true if permission is READ_ONLY.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### serialVersionUID

    public static final long serialVersionUID
    See Also:
      - Constant Field Values

  - ### ANONYMOUS_USERNAME

    public static final String ANONYMOUS_USERNAME
    Name associated with anonymous user
    See Also:
      - Constant Field Values

  - ### READ_ONLY

    public static final int READ_ONLY
    Value corresponding to Read-only permission for a repository user.
    See Also:
      - Constant Field Values

  - ### WRITE

    public static final int WRITE
    Value corresponding to Write permission for a repository user.
    See Also:
      - Constant Field Values

  - ### ADMIN

    public static final int ADMIN
    Value corresponding to Administrative permission for a repository user.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### User

    public User(String name, int permission)
    Constructor.
    Parameters:
      `name` - user id/name
      `permission` - permission value (READ_ONLY, WRITE or ADMIN)

- ## Method Details

  - ### getName

    public String getName()
    Returns user id/name

  - ### isReadOnly

    public boolean isReadOnly()
    Returns true if permission is READ_ONLY.

  - ### hasWritePermission

    public boolean hasWritePermission()
    Return true if this user has permission of WRITE or ADMIN.

  - ### isAdmin

    public boolean isAdmin()
    Returns true if permission is ADMIN.

  - ### getPermissionType

    public int getPermissionType()
    Returns the permission value assigned this user.

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### equals

    public boolean equals(Object obj)
    Overrides:
      `equals` in class `Object`

  - ### compareTo

    public int compareTo(User other)
    Specified by:
      `compareTo` in interface `Comparable<User>`