Class AdministratorAccess
java.lang.Object
com.iizix.server.user.AdministratorAccess
The rule of who administers the server: a user in an ENABLED group named
GroupInfo.ADMIN_GROUP_NAME. A group flagged "all apps" grants access to applications, not administration, and admits nobody here; a disabled group grants nothing; a disabled user is refused (the owner's ruling SA-1 of CC-FIX-SERVERADMIN, 2026-09-27).ServerAdmin asks at every sign-in and at every entry of one of its pages (com.iizix.serveradmin.AdminSessionGate; the owner's ruling SA-1 of CC-SERVERADMIN-SIGNIN, 2026-10-02). The groups are read from the database on every call, and sessionRefusal(IAuthenticatedUser) reads the user again too: a user disabled or taken out of the group while signed in, and a group disabled by SQL, count at the next page.
- Author:
- Christopher Mindus
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumWhat became of a real e-mail address an administrator entered (setRealEmail(IAuthenticatedUser, String)).Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe domain of the e-mail address the server's database gives its administrator (createBaseTables.sql:default@iizi.server.administrator).The application IDs of ServerAdmin (decision B5D-D-b):com.iizix.serveradmin, the ID of its module (iiziServer\apps\ServerAdmin\.iiziModuleProject) and of every launcher since CC-FIX-SERVERADMIN-APPID (iiziServer\bin\iiziServer.bat,.sh,BuildUtil\LinuxCommands\launchServer.sh), andcom.iizix.server.admin, the ID the shipped launchers gave it up to r20656, which a server configured by hand may still name.Method Summary
Modifier and TypeMethodDescriptionstatic StringemailRefusal(BasicUserInfo user) Decides whether a database user must enter a real e-mail address before administering the server (the owner's ruling ADM-D-1, 2026-10-18): a member of an enabled administrators group whose address is in the seeded domain (isSeededEmail(String)) - the account the server was installed with - or who has NO address at all (hasNoEmail(String); the owner's ruling UX-D-6 of CC-FIX-SIGNIN-V5-UX, 2026-10-18 23:12: a forgotten password of such an account cannot be reset either).static booleanhasNoEmail(String email) Checks if an account has no e-mail address at all: null or blank (UX-D-6).static booleanisRealEmail(String email) Checks if an address an administrator enters is a real one: well formed (EmailAddressForm) and not in the seeded domain (isSeededEmail(String)).static booleanisSeededEmail(String email) Checks if an e-mail address is in the domain the database was created with (SEEDED_EMAIL_DOMAIN, or a subdomain of it), compared without regard to case: the placeholder of the administrator the server was installed with.static booleanisServerAdmin(String appID) Checks whether an application ID is one of ServerAdmin's (SERVER_ADMIN_APP_IDS).static StringmemberRefusal(BasicUserInfo user) Decides whether a database user is a member of an enabled administrators group, whether the user itself is enabled or not.static booleanChecks if the user of a session must still enter a real e-mail address (emailRefusal(BasicUserInfo)), the user read from the database again: what the SignIn module asks before it hands over.static PasswordPolicypasswordPolicyFor(ServerSettings settings, BasicUserInfo bui) Gets the password policy that applies to a user: the administrators' for a member of the administrators group, the users' for everyone else and for a user that does not exist - the one rule, which the SignIn module's change of password and ServerAdmin's Edit user share (CC-ACCOUNT-EMAIL-PASSWORD, AE-1; before it,UserAuthenticationUIImpl.policyFor).static Stringrefusal(BasicUserInfo user) Decides whether a database user may administer the server.static Stringrefusal(IAuthenticatedUser user) Decides whether an authenticated user may administer the server.static StringDecides whether the user of a running session may administer the server NOW: the user is read from the database again, so that a user disabled, deleted or taken out of the administrators group while signed in is refused, and so is one who must still change the password - the first sign-in of an administrator the server was installed with can do nothing but change it (the owner's rulings SA-1 and SA-2b-1 of CC-SERVERADMIN-SIGNIN) - and one who has no real e-mail address yet (emailRefusal(BasicUserInfo), the owner's ruling ADM-D-1 of 2026-10-18): the SignIn module asks for it before it hands over.setRealEmail(IAuthenticatedUser user, String email) Sets the real e-mail address of an administrator who must enter one (emailRefusal(BasicUserInfo)): at once and not verified - the verification follows the sign-in policy'semailVerificationDays- and the cached user is refreshed.
Field Details
SERVER_ADMIN_APP_IDS
The application IDs of ServerAdmin (decision B5D-D-b):com.iizix.serveradmin, the ID of its module (iiziServer\apps\ServerAdmin\.iiziModuleProject) and of every launcher since CC-FIX-SERVERADMIN-APPID (iiziServer\bin\iiziServer.bat,.sh,BuildUtil\LinuxCommands\launchServer.sh), andcom.iizix.server.admin, the ID the shipped launchers gave it up to r20656, which a server configured by hand may still name. Matched against the application's own ID, never an alias.The one place the server knows them (CC-FIX-SERVERADMIN-GATE-UNDECLARED, PL-D-6 (a)): the licence lets them past on an unlicensed server (
LicenseCounter), and an application of one of them must have its gate - the session and every sign-in are refused when its first module declares none (AppSessionGyro,UserAuthentication).SEEDED_EMAIL_DOMAIN
The domain of the e-mail address the server's database gives its administrator (createBaseTables.sql:default@iizi.server.administrator). No mailbox is there: a "Forgot password?" of such an account mails into the void.- See Also:
Method Details
isServerAdmin
Checks whether an application ID is one of ServerAdmin's (SERVER_ADMIN_APP_IDS).- Parameters:
appID- The application's own ID (not an alias), null for none.- Returns:
- true for an ID of ServerAdmin, matched exactly, false otherwise and for null.
refusal
Decides whether an authenticated user may administer the server.- Parameters:
user- The authenticated user, null or undefined when nobody has signed in.- Returns:
- null when admitted, otherwise the reason of the refusal, for the log.
- Throws:
SQLException- For SQL errors reading the groups.NotFoundException- If a group of the user has been deleted.
refusal
Decides whether a database user may administer the server.- Parameters:
user- The user.- Returns:
- null when admitted, otherwise the reason of the refusal, for the log.
- Throws:
SQLException- For SQL errors reading the groups.NotFoundException- If a group of the user has been deleted.
sessionRefusal
Decides whether the user of a running session may administer the server NOW: the user is read from the database again, so that a user disabled, deleted or taken out of the administrators group while signed in is refused, and so is one who must still change the password - the first sign-in of an administrator the server was installed with can do nothing but change it (the owner's rulings SA-1 and SA-2b-1 of CC-SERVERADMIN-SIGNIN) - and one who has no real e-mail address yet (emailRefusal(BasicUserInfo), the owner's ruling ADM-D-1 of 2026-10-18): the SignIn module asks for it before it hands over.- Parameters:
user- The session's user, null or undefined when nobody has signed in.- Returns:
- null when admitted, otherwise the reason of the refusal, for the log.
- Throws:
SQLException- For SQL errors reading the user or the groups.NotFoundException- If a group of the user has been deleted.
isSeededEmail
Checks if an e-mail address is in the domain the database was created with (SEEDED_EMAIL_DOMAIN, or a subdomain of it), compared without regard to case: the placeholder of the administrator the server was installed with.- Parameters:
email- The address, null for none.- Returns:
- true for an address in that domain, false otherwise and for none.
isRealEmail
Checks if an address an administrator enters is a real one: well formed (EmailAddressForm) and not in the seeded domain (isSeededEmail(String)).- Parameters:
email- The address as typed, null for none.- Returns:
- true for a real address.
emailRefusal
Decides whether a database user must enter a real e-mail address before administering the server (the owner's ruling ADM-D-1, 2026-10-18): a member of an enabled administrators group whose address is in the seeded domain (isSeededEmail(String)) - the account the server was installed with - or who has NO address at all (hasNoEmail(String); the owner's ruling UX-D-6 of CC-FIX-SIGNIN-V5-UX, 2026-10-18 23:12: a forgotten password of such an account cannot be reset either). An external Sign In Provider's account is never asked: its address comes from the provider. The verification of the address follows the sign-in policy'semailVerificationDays, as for every address.- Parameters:
user- The user, as read from the database.- Returns:
- null when no address is needed, otherwise the reason, for the log.
- Throws:
SQLException- For SQL errors reading the groups.NotFoundException- If a group of the user has been deleted.
hasNoEmail
Checks if an account has no e-mail address at all: null or blank (UX-D-6).- Parameters:
email- The address, null for none.- Returns:
- true for none.
needsRealEmail
Checks if the user of a session must still enter a real e-mail address (emailRefusal(BasicUserInfo)), the user read from the database again: what the SignIn module asks before it hands over.- Parameters:
user- The session's user, null or undefined when nobody has signed in.- Returns:
- true when the address is needed; false otherwise, and when it cannot be told (logged): ServerAdmin's gate, which reads the same rule, refuses then.
setRealEmail
Sets the real e-mail address of an administrator who must enter one (emailRefusal(BasicUserInfo)): at once and not verified - the verification follows the sign-in policy'semailVerificationDays- and the cached user is refreshed. The caller mails the verification link (the SignIn module,resendVerificationMail). Every other account changes its address by a link mailed to the new address, or in ServerAdmin.- Parameters:
user- The signed-in user.email- The address as typed.- Returns:
- What became of it.
memberRefusal
Decides whether a database user is a member of an enabled administrators group, whether the user itself is enabled or not.- Parameters:
user- The user.- Returns:
- null for a member, otherwise the reason, for the log.
- Throws:
SQLException- For SQL errors reading the groups.NotFoundException- If a group of the user has been deleted.
passwordPolicyFor
Gets the password policy that applies to a user: the administrators' for a member of the administrators group, the users' for everyone else and for a user that does not exist - the one rule, which the SignIn module's change of password and ServerAdmin's Edit user share (CC-ACCOUNT-EMAIL-PASSWORD, AE-1; before it,UserAuthenticationUIImpl.policyFor).- Parameters:
settings- The server settings.bui- The user, null for none.- Returns:
- The policy.