Skip to content

Commit

Permalink
fix: Removed ability to set role type through api during creation - i…
Browse files Browse the repository at this point in the history
…t's now always custom
  • Loading branch information
sighphyre authored and ivarconr committed Jan 11, 2022
1 parent cd782be commit 8babe8c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
6 changes: 0 additions & 6 deletions src/lib/services/access-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -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(
Expand Down
3 changes: 1 addition & 2 deletions src/lib/services/role-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { Logger } from '../logger';
interface IRoleCreation {
name: string;
description: string;
roleType: string;
permissions?: IPermission[];
}

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 8babe8c

Please sign in to comment.