Align SLURP access control with config authority levels
This commit is contained in:
		| @@ -274,14 +274,13 @@ func (c *Config) ApplyRoleDefinition(role string) error { | ||||
| } | ||||
|  | ||||
| // GetRoleAuthority returns the authority level for a role (from CHORUS) | ||||
| func (c *Config) GetRoleAuthority(role string) (string, error) { | ||||
| 	// This would contain the authority mapping from CHORUS | ||||
| 	switch role { | ||||
| 	case "admin": | ||||
| 		return "master", nil | ||||
| 	default: | ||||
| 		return "member", nil | ||||
| func (c *Config) GetRoleAuthority(role string) (AuthorityLevel, error) { | ||||
| 	roles := GetPredefinedRoles() | ||||
| 	if def, ok := roles[role]; ok { | ||||
| 		return def.AuthorityLevel, nil | ||||
| 	} | ||||
|  | ||||
| 	return AuthorityReadOnly, fmt.Errorf("unknown role: %s", role) | ||||
| } | ||||
|  | ||||
| // Helper functions for environment variable parsing | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 anthonyrawlins
					anthonyrawlins