added cloud perms
This commit is contained in:
parent
0f1626fae5
commit
3ab5894576
@ -8,6 +8,7 @@ export const Permission = {
|
||||
Delete: 1 << 4,
|
||||
RunCommand: 1 << 5,
|
||||
Admin: 1 << 6,
|
||||
Cloud: 1 << 7,
|
||||
}
|
||||
|
||||
const definitions = {
|
||||
|
@ -164,9 +164,10 @@ function CustomField(props: WidgetProps){
|
||||
{label: 'Stop', value: Permission.Stop},
|
||||
{label: 'Browse', value: Permission.Browse},
|
||||
{label: 'Delete', value: Permission.Delete},
|
||||
{label: 'RunCommand', value: Permission.RunCommand},
|
||||
{label: 'Run Command', value: Permission.RunCommand},
|
||||
{label: 'Create', value: Permission.Create},
|
||||
{label: 'Admin', value: Permission.Admin},
|
||||
{label: 'Cloud', value: Permission.Cloud},
|
||||
]}} registry={registry} value={convertNumber(props.value)} />
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,6 @@ import { CssBaseline, Box, Typography, TextField, FormControlLabel, Checkbox, Co
|
||||
import React, { FormEventHandler, useContext } from "react";
|
||||
import { Navigate } from "react-router-dom";
|
||||
import { api, apiAuthenticatedContext } from "./common";
|
||||
import Cookies from 'js-cookie'
|
||||
|
||||
export const fetchToken = async (username: string, password: string, remember: boolean) => {
|
||||
try {
|
||||
|
@ -28,6 +28,9 @@ function getPermissionStrings(permissions: number){
|
||||
if (permissions & Permission.RunCommand){
|
||||
strings.push("Run Command")
|
||||
}
|
||||
if (permissions & Permission.Cloud){
|
||||
strings.push("Cloud")
|
||||
}
|
||||
return strings
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user