Package com.aoindustries.aoserv.master
Class AccountUserHandler
java.lang.Object
com.aoindustries.aoserv.master.AccountUserHandler
The
UsernameHandler handles all the accesses to the account.User table.- Author:
- AO Industries, Inc.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddUser(DatabaseConnection conn, RequestSource source, InvalidateList invalidateList, Account.Name packageName, User.Name name, boolean avoidSecurityChecks) static booleancanAccessUser(DatabaseConnection conn, RequestSource source, User.Name user) static booleancanUserAccessHost(DatabaseConnection conn, User.Name user, int host) static voidcheckAccessUser(DatabaseConnection conn, RequestSource source, String action, User.Name user) static voidcheckUserAccessHost(DatabaseConnection conn, RequestSource source, String action, User.Name user, int host) static voiddisableUser(DatabaseConnection conn, RequestSource source, InvalidateList invalidateList, int disableLog, User.Name user) static voidenableUser(DatabaseConnection conn, RequestSource source, InvalidateList invalidateList, User.Name user) static Account.NamegetAccountForUser(DatabaseAccess db, User.Name user) static intgetDisableLogForUser(DatabaseConnection conn, User.Name user) static IntListgetHostsForUser(DatabaseConnection conn, User.Name user) static Account.NamegetPackageForUser(DatabaseConnection conn, User.Name user) getUsersForPackage(DatabaseConnection conn, Account.Name packageName) static voidinvalidateTable(Table.TableId tableId) static booleanisUserDisabled(DatabaseConnection conn, User.Name user) static booleanisUserNameAvailable(DatabaseConnection conn, User.Name name) static voidremoveUser(DatabaseConnection conn, InvalidateList invalidateList, User.Name user) static voidremoveUser(DatabaseConnection conn, RequestSource source, InvalidateList invalidateList, User.Name user)
-
Method Details
-
canAccessUser
public static boolean canAccessUser(DatabaseConnection conn, RequestSource source, User.Name user) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
checkAccessUser
public static void checkAccessUser(DatabaseConnection conn, RequestSource source, String action, User.Name user) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
addUser
public static void addUser(DatabaseConnection conn, RequestSource source, InvalidateList invalidateList, Account.Name packageName, User.Name name, boolean avoidSecurityChecks) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
disableUser
public static void disableUser(DatabaseConnection conn, RequestSource source, InvalidateList invalidateList, int disableLog, User.Name user) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
enableUser
public static void enableUser(DatabaseConnection conn, RequestSource source, InvalidateList invalidateList, User.Name user) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
getDisableLogForUser
public static int getDisableLogForUser(DatabaseConnection conn, User.Name user) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
invalidateTable
-
isUserNameAvailable
public static boolean isUserNameAvailable(DatabaseConnection conn, User.Name name) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
isUserDisabled
public static boolean isUserDisabled(DatabaseConnection conn, User.Name user) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
removeUser
public static void removeUser(DatabaseConnection conn, RequestSource source, InvalidateList invalidateList, User.Name user) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
removeUser
public static void removeUser(DatabaseConnection conn, InvalidateList invalidateList, User.Name user) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
getAccountForUser
public static Account.Name getAccountForUser(DatabaseAccess db, User.Name user) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
getPackageForUser
public static Account.Name getPackageForUser(DatabaseConnection conn, User.Name user) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
getHostsForUser
public static IntList getHostsForUser(DatabaseConnection conn, User.Name user) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
getUsersForPackage
public static List<User.Name> getUsersForPackage(DatabaseConnection conn, Account.Name packageName) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
canUserAccessHost
public static boolean canUserAccessHost(DatabaseConnection conn, User.Name user, int host) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
checkUserAccessHost
public static void checkUserAccessHost(DatabaseConnection conn, RequestSource source, String action, User.Name user, int host) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
