Skip to content
Snippets Groups Projects
consts.ts 2.55 KiB
Newer Older
Valentino's avatar
Valentino committed
import { UserRole } from 'src/services/users';

Valentino's avatar
Valentino committed
export const appAccessList = [
  {
Valentino's avatar
Valentino committed
    name: 'wekan',
Valentino's avatar
Valentino committed
    image: '/assets/wekan.svg',
Valentino's avatar
Valentino committed
    label: 'Wekan',
Davor Ivankovic's avatar
Davor Ivankovic committed
    documentationUrl: 'https://github.com/wekan/wekan/wiki',
Valentino's avatar
Valentino committed
  },
  {
Valentino's avatar
Valentino committed
    name: 'wordpress',
Valentino's avatar
Valentino committed
    image: '/assets/wordpress.svg',
Valentino's avatar
Valentino committed
    label: 'Wordpress',
Davor Ivankovic's avatar
Davor Ivankovic committed
    documentationUrl: 'https://wordpress.org/support/',
Valentino's avatar
Valentino committed
  },
  {
Davor's avatar
Davor committed
    name: 'nextcloud',
Valentino's avatar
Valentino committed
    image: '/assets/nextcloud.svg',
Davor's avatar
Davor committed
    label: 'Nextcloud',
Davor Ivankovic's avatar
Davor Ivankovic committed
    documentationUrl: 'https://docs.nextcloud.com/server/latest/user_manual/en/',
Valentino's avatar
Valentino committed
  },
  {
Valentino's avatar
Valentino committed
    name: 'zulip',
Valentino's avatar
Valentino committed
    image: '/assets/zulip.svg',
Valentino's avatar
Valentino committed
    label: 'Zulip',
Davor Ivankovic's avatar
Davor Ivankovic committed
    documentationUrl: 'https://docs.zulip.com/help/',
Valentino's avatar
Valentino committed
  },
  {
    name: 'monitoring',
    image: '/assets/monitoring.svg',
    label: 'Monitoring',
    documentationUrl: 'https://grafana.com/docs/',
  },
Valentino's avatar
Valentino committed
];
Valentino's avatar
Valentino committed

// List of external application which are not part of Stackspin. This is to
Mart van Santen's avatar
Mart van Santen committed
// load nice icons and labels. Because in the future translations are planned
// this list is included in the frontend and do not rely on the information
// provides by the baccken.
export const appExternalAccessList = [
  // 3 Possible names for email
  {
    name: 'email',
    image: '/assets/email.svg',
    label: 'E-mail',
    documentationUrl: '',
  },
  {
    name: 'mail',
    image: '/assets/email.svg',
    label: 'E-mail',
    documentationUrl: '',
  },
  {
    name: 'zimbra',
Mart van Santen's avatar
Mart van Santen committed
    image: '/assets/email.svg',
Mart van Santen's avatar
Mart van Santen committed
    label: 'E-mail',
    documentationUrl: '',
  },
  // Other common applications
  {
    name: 'gitlab',
    image: '/assets/gitlab.svg',
    label: 'GitLab',
    documentationUrl: '',
  },
  {
    name: 'mattermost',
    image: '/assets/mattermost.svg',
    label: 'Mattermost',
    documentationUrl: '',
  },
  {
    name: 'vpn',
    image: '/assets/vpn.svg',
    label: 'VPN',
    documentationUrl: '',
  },
  // This is used for all other
  {
    name: 'other',
    image: '/assets/other.svg',
    label: '',
    documentationUrl: '',
  },
];

export const allAppAccessList = [
  {
    name: 'dashboard',
    image: '/assets/logo-small.svg',
    label: 'Dashboard',
  },
  ...appAccessList,
];

export const initialAppRoles = [
Valentino's avatar
Valentino committed
  {
    name: 'dashboard',
    role: UserRole.User,
  },
  {
    name: 'wekan',
    role: UserRole.User,
Valentino's avatar
Valentino committed
  },
  {
    name: 'wordpress',
    role: UserRole.User,
Valentino's avatar
Valentino committed
  },
  {
Davor's avatar
Davor committed
    name: 'nextcloud',
    role: UserRole.User,
Valentino's avatar
Valentino committed
  },
  {
    name: 'zulip',
    role: UserRole.User,
Valentino's avatar
Valentino committed
  },
  {
    name: 'monitoring',
    role: UserRole.NoAccess,
  },
Valentino's avatar
Valentino committed
];

export const initialUserForm = {
  id: '',
  name: '',
  email: '',
  app_roles: initialAppRoles,
  status: '',
};