package rbac const ( SuperUser = 50 // SuperUser Full Control - NSI Team AdvancedWrite = 20 // Most CRUD Functionality BasicWrite = 10 // Access to some POST/PUT calls AdvancedRead = 5 // Access to most GET calls BasicRead = 1 // Access to some read. Available for all users NoAccess = 0 // Unable to access any API calls // ErrForbidden default response messages ErrForbidden = "you do not have the correct permission level to perform this action" ) type classification struct { groupName string explicitUsers []string lvl int desc string } var apiRoles = []classification{ { groupName: "lnx-NETSEC-DEVOPS", lvl: SuperUser, explicitUsers: []string{ "netsec01", "netsec.devops", }, desc: "Full Control", }, { groupName: "nsi_api_write_20", lvl: AdvancedWrite, explicitUsers: []string{ "businessautomation", "automationqe", "processuser", "ratpatrol", "dcx_provisioning", "dcx_provisioning_test", "dcx_services_staging", "dcx_services", }, desc: "Access to most CRUD functions", }, { groupName: "nsi_api_write_10", lvl: BasicWrite, explicitUsers: []string{ "netsec02", }, desc: "Access to some POST/PUT calls", }, { groupName: "nsi_api_users", lvl: AdvancedRead, desc: "Access to most GET calls", }, }