mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	fix: Removed ability to set role type through api during creation - it's now always custom
This commit is contained in:
		
							parent
							
								
									cd782be6dc
								
							
						
					
					
						commit
						8babe8cadf
					
				| @ -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( | ||||
|  | ||||
| @ -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); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user