File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed 
src/main/kotlin/com/cosmotech/api/rbac Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ const val PERMISSION_DELETE = "delete"
2222const  val  PERMISSION_LAUNCH  =  " launch" 
2323const  val  PERMISSION_VALIDATE  =  " validate" 
2424
25+ val  NO_PERMISSIONS  =  emptyList<String >()
26+ 
2527val  COMMON_ROLE_READER_PERMISSIONS  =  listOf (PERMISSION_READ )
2628val  COMMON_ROLE_USER_PERMISSIONS  = 
2729    listOf (PERMISSION_READ , PERMISSION_READ_SECURITY , PERMISSION_CREATE_CHILDREN )
@@ -92,6 +94,7 @@ fun getCommonRolesDefinition(): RolesDefinition {
9294  return  RolesDefinition (
9395      permissions = 
9496          mutableMapOf (
97+               ROLE_NONE  to NO_PERMISSIONS ,
9598              ROLE_VIEWER  to COMMON_ROLE_READER_PERMISSIONS ,
9699              ROLE_USER  to COMMON_ROLE_USER_PERMISSIONS ,
97100              ROLE_EDITOR  to COMMON_ROLE_EDITOR_PERMISSIONS ,
@@ -104,6 +107,7 @@ fun getRunnerRolesDefinition(): RolesDefinition {
104107  return  RolesDefinition (
105108      permissions = 
106109          mutableMapOf (
110+               ROLE_NONE  to NO_PERMISSIONS ,
107111              ROLE_VIEWER  to RUNNER_ROLE_VIEWER_PERMISSIONS ,
108112              ROLE_EDITOR  to RUNNER_ROLE_EDITOR_PERMISSIONS ,
109113              ROLE_VALIDATOR  to RUNNER_ROLE_VALIDATOR_PERMISSIONS ,
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments