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 void
addUser
(DatabaseConnection conn, RequestSource source, InvalidateList invalidateList, Account.Name packageName, User.Name name, boolean avoidSecurityChecks) static boolean
canAccessUser
(DatabaseConnection conn, RequestSource source, User.Name user) static boolean
canUserAccessHost
(DatabaseConnection conn, User.Name user, int host) static void
checkAccessUser
(DatabaseConnection conn, RequestSource source, String action, User.Name user) static void
checkUserAccessHost
(DatabaseConnection conn, RequestSource source, String action, User.Name user, int host) static void
disableUser
(DatabaseConnection conn, RequestSource source, InvalidateList invalidateList, int disableLog, User.Name user) static void
enableUser
(DatabaseConnection conn, RequestSource source, InvalidateList invalidateList, User.Name user) static Account.Name
getAccountForUser
(DatabaseAccess db, User.Name user) static int
getDisableLogForUser
(DatabaseConnection conn, User.Name user) static IntList
getHostsForUser
(DatabaseConnection conn, User.Name user) static Account.Name
getPackageForUser
(DatabaseConnection conn, User.Name user) getUsersForPackage
(DatabaseConnection conn, Account.Name packageName) static void
invalidateTable
(Table.TableId tableId) static boolean
isUserDisabled
(DatabaseConnection conn, User.Name user) static boolean
isUserNameAvailable
(DatabaseConnection conn, User.Name name) static void
removeUser
(DatabaseConnection conn, InvalidateList invalidateList, User.Name user) static void
removeUser
(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:
IOException
SQLException
-
checkAccessUser
public static void checkAccessUser(DatabaseConnection conn, RequestSource source, String action, User.Name user) throws IOException, SQLException - Throws:
IOException
SQLException
-
addUser
public static void addUser(DatabaseConnection conn, RequestSource source, InvalidateList invalidateList, Account.Name packageName, User.Name name, boolean avoidSecurityChecks) throws IOException, SQLException - Throws:
IOException
SQLException
-
disableUser
public static void disableUser(DatabaseConnection conn, RequestSource source, InvalidateList invalidateList, int disableLog, User.Name user) throws IOException, SQLException - Throws:
IOException
SQLException
-
enableUser
public static void enableUser(DatabaseConnection conn, RequestSource source, InvalidateList invalidateList, User.Name user) throws IOException, SQLException - Throws:
IOException
SQLException
-
getDisableLogForUser
public static int getDisableLogForUser(DatabaseConnection conn, User.Name user) throws IOException, SQLException - Throws:
IOException
SQLException
-
invalidateTable
-
isUserNameAvailable
public static boolean isUserNameAvailable(DatabaseConnection conn, User.Name name) throws IOException, SQLException - Throws:
IOException
SQLException
-
isUserDisabled
public static boolean isUserDisabled(DatabaseConnection conn, User.Name user) throws IOException, SQLException - Throws:
IOException
SQLException
-
removeUser
public static void removeUser(DatabaseConnection conn, RequestSource source, InvalidateList invalidateList, User.Name user) throws IOException, SQLException - Throws:
IOException
SQLException
-
removeUser
public static void removeUser(DatabaseConnection conn, InvalidateList invalidateList, User.Name user) throws IOException, SQLException - Throws:
IOException
SQLException
-
getAccountForUser
public static Account.Name getAccountForUser(DatabaseAccess db, User.Name user) throws IOException, SQLException - Throws:
IOException
SQLException
-
getPackageForUser
public static Account.Name getPackageForUser(DatabaseConnection conn, User.Name user) throws IOException, SQLException - Throws:
IOException
SQLException
-
getHostsForUser
public static IntList getHostsForUser(DatabaseConnection conn, User.Name user) throws IOException, SQLException - Throws:
IOException
SQLException
-
getUsersForPackage
public static List<User.Name> getUsersForPackage(DatabaseConnection conn, Account.Name packageName) throws IOException, SQLException - Throws:
IOException
SQLException
-
canUserAccessHost
public static boolean canUserAccessHost(DatabaseConnection conn, User.Name user, int host) throws IOException, SQLException - Throws:
IOException
SQLException
-
checkUserAccessHost
public static void checkUserAccessHost(DatabaseConnection conn, RequestSource source, String action, User.Name user, int host) throws IOException, SQLException - Throws:
IOException
SQLException
-