1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-07 01:16:28 +02:00

fix: Removed ability to set role type through api during creation - it's now always custom

This commit is contained in:
sighphyre 2021-12-15 13:51:10 +02:00 committed by Ivar Conradi Østhus
parent cd782be6dc
commit 8babe8cadf
No known key found for this signature in database
GPG Key ID: 31AC596886B0BD09
2 changed files with 1 additions and 8 deletions

View File

@ -21,11 +21,6 @@ import {
export const ALL_PROJECTS = '*';
export const ALL_ENVS = '*';
const PROJECT_DESCRIPTION = {
OWNER: 'Users with this role have full control over the project, and can add and manage other users within the project context, manage feature toggles within the project, and control advanced project features like archiving and deleting the project.',
MEMBER: 'Users with this role within a project are allowed to view, create and update feature toggles, but have limited permissions in regards to managing the projects user access and can not archive or delete the project.',
};
const { ADMIN } = permissions;
const PROJECT_ADMIN = [
@ -287,7 +282,6 @@ export class AccessService {
): Promise<[IRole[], IUserWithRole[]]> {
const roles = await this.store.getProjectRoles();
console.log('GOt the following roles bacl', roles);
const users = await Promise.all(
roles.map(async (role) => {
const usrs = await this.getProjectUsersForRole(

View File

@ -8,7 +8,6 @@ import { Logger } from '../logger';
interface IRoleCreation {
name: string;
description: string;
roleType: string;
permissions?: IPermission[];
}
@ -43,7 +42,7 @@ export default class RoleService {
const baseRole = {
name: role.name,
description: role.description,
roleType: role.roleType,
roleType: 'custom',
};
const permissions = role.permissions;
const newRole = await this.store.create(baseRole);