added cloud perms

This commit is contained in:
ACoolName 2024-05-26 10:49:07 +03:00
parent 0f1626fae5
commit 3ab5894576
4 changed files with 6 additions and 2 deletions

View File

@ -8,6 +8,7 @@ export const Permission = {
Delete: 1 << 4,
RunCommand: 1 << 5,
Admin: 1 << 6,
Cloud: 1 << 7,
}
const definitions = {

View File

@ -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)} />
}

View File

@ -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 {

View File

@ -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
}