Skip to content

User Control ​

The User Control app is an app that provides information about the current user and allows for the user to configure settings such as cookie consent.

WARNING

For this app to function, it requires the Alliance Data backend.
Please note that this backend is exclusively accessible to developers from team Alliance.

How to install ​

  1. Install as developer dependency

    npm install -D @alliance/app-user-control --registry https://registry.webprovisions.io
  2. Add app to your Alliance configuration file.

    ts
    // alliance.config.ts
    import { defineConfig } from '@alliance/framework/config';
    
    export default defineConfig({
      server: {
        apps: ['@alliance/app-user-control'],
      },
    });

Capabilities ​

No available capabilities.

Managed Objects ​

currentUser ​

Object containing information about the current user.

Example

ts
// app.ts
import { queryObjects } from '@alliance/framework';

const query = queryObjects('currentUser');

const currentUser = await query.resolve();

Object Type ​

PropertyTypeDescription
firstNamestringUsers first name
lastNamestringUsers last name
emailstringUsers email address
idstringUsers id
rolesstring[]Users roles
applicationsApplications[]Array of applications the user has access to
usernamestringUsers username
Applications ​
PropertyTypeDescription
applicationIdstringApplication id
applicationInstanceIdstringApplication instance id
applicationNamestringApplication name
applicationTypestringApplication type/slug

Query Args ​

No arguments.

currentWorkspace ​

Object containing information about the current workspace.

Example

ts
// app.ts
import { queryObjects } from '@alliance/framework';

const query = queryObjects('currentWorkspace');

const currentWorkspace = await query.resolve();

Object Type ​

PropertyTypeDescription
idstringWorkspace id
namestringWorkspace name
slugstringURL friendly workspace name

Query Args ​

No arguments.

currentOrganization ​

Object containing information about the current organization.

Example

ts
// app.ts
import { queryObjects } from '@alliance/framework';

const query = queryObjects('currentOrganization');

const currentOrganization = await query.resolve();

Object Type ​

PropertyTypeDescription
idstringOrganization id
namestringOrganization name
slugstringURL friendly workspace name
idp'OIDC' | 'SAML' | 'DIRECTORY' | undefinedOrganization IdP type
passwordPolicyPasswordPolicy | undefinedOrganization password policy
PasswordPolicy ​
PropertyTypeDescription
enabledbooleanWhether the password policy is enabled
minimumLengthnumberThe minimum length of the password
requireUppercasebooleanWhether the password must contain an uppercase letter
requireLowercasebooleanWhether the password must contain a lowercase letter
requireNumberbooleanWhether the password must contain a number
requireSymbolbooleanWhether the password must contain a symbol

Query Args ​

No arguments.