public class UserAccountController extends BizController
BizController.SaveHelper
Modifier and Type | Field and Description |
---|---|
static String |
PERMISSION_MANAGE_USER_ACCOUNTS
The permission required to add, modify or delete accounts
|
Constructor and Description |
---|
UserAccountController() |
Modifier and Type | Method and Description |
---|---|
void |
account(sirius.web.http.WebContext ctx,
String accountId)
Shows an editor for the given account.
|
void |
accountConfig(sirius.web.http.WebContext ctx,
String accountId)
Shows an editor for the custom configuration of the given user.
|
void |
accounts(sirius.web.http.WebContext ctx)
Shows a list of all available users of the current tenant.
|
void |
accountUpdate(sirius.web.http.WebContext ctx,
sirius.web.services.JSONStructuredOutput out,
String accountId)
Provides a JSON API to change the settings of an account, including its configuration.
|
void |
deleteAdmin(sirius.web.http.WebContext ctx,
String id)
Deletes the given account.
|
void |
forgotPassword(sirius.web.http.WebContext ctx,
sirius.web.services.JSONStructuredOutput out)
Provides a JSON API which re-sends the password to the account with the given email address.
|
void |
generatePassword(sirius.web.http.WebContext ctx,
String id)
Generates a new password for the given account and send a mail to the user.
|
String |
getRoleDescription(String role)
Returns a description of the role.
|
String |
getRoleName(String role)
Returns the translated name of a role.
|
List<String> |
getRoles()
Lists all roles which can be granted to a user.
|
void |
logout(sirius.web.http.WebContext ctx)
Executes a logout for the current scope.
|
void |
selectUserAccount(sirius.web.http.WebContext ctx,
String id)
Makes the current user belong to the given tenant.
|
void |
selectUserAccounts(sirius.web.http.WebContext ctx)
Lists all users which the current user can "become" (switch to).
|
void |
usersAutocomplete(sirius.web.http.WebContext ctx)
Autocompletion for UserAccounts.
|
assertNotNew, assertTenant, find, findForTenant, getBaseUrl, load, load, load, prepareSave, setOrVerify, tryFind, tryFindForTenant, validate
public static final String PERMISSION_MANAGE_USER_ACCOUNTS
public void accounts(sirius.web.http.WebContext ctx)
ctx
- the current requestpublic void account(sirius.web.http.WebContext ctx, String accountId)
ctx
- the current requestaccountId
- the UserAccount
to editpublic void accountConfig(sirius.web.http.WebContext ctx, String accountId)
ctx
- the current requestaccountId
- the id of the account which config will be editedpublic void accountUpdate(sirius.web.http.WebContext ctx, sirius.web.services.JSONStructuredOutput out, String accountId)
ctx
- the current requestout
- the JSON response being generatedaccountId
- the id of the account to updatepublic List<String> getRoles()
public String getRoleName(String role)
role
- the role to translatepublic String getRoleDescription(String role)
role
- the role to fetch the description forpublic void generatePassword(sirius.web.http.WebContext ctx, String id)
ctx
- the current requestid
- the account for which a password is to be createdpublic void forgotPassword(sirius.web.http.WebContext ctx, sirius.web.services.JSONStructuredOutput out)
ctx
- the current requestout
- the JSON response being generatedpublic void deleteAdmin(sirius.web.http.WebContext ctx, String id)
ctx
- the current requestid
- the account to deletepublic void logout(sirius.web.http.WebContext ctx)
ctx
- the current requestpublic void usersAutocomplete(sirius.web.http.WebContext ctx)
Only accepts UserAccounts which belong to the current Tenant.
ctx
- the current requestpublic void selectUserAccounts(sirius.web.http.WebContext ctx)
ctx
- the current requestpublic void selectUserAccount(sirius.web.http.WebContext ctx, String id)
ctx
- the current requestid
- the id of the tenant to switch toCopyright © 2018. All rights reserved.