Documentation ¶
Index ¶
- Constants
- Variables
- func ContainsPolicies(t *testing.T, expPolicies []policysupport.PolicyInfo, ...) bool
- func HasPolicy(expPolicies []policysupport.PolicyInfo, act policysupport.PolicyInfo) bool
- func MakeActionMembers() map[string]ActionMembers
- func MakeEmail(principalId string) string
- func MakePolicies(actionMembers map[string][]string, resourceId string) []policysupport.PolicyInfo
- func MakePolicyTestUser(emailNoPrefix string) string
- func MakePolicyTestUsers(actionMember ActionMembers) []string
- func MakePrincipalEmailMap() map[string]string
- func MakeRar(actionAndRes string, roles []string) providerscommon.ResourceActionRoles
- func MakeRarList(retActionRoles map[string][]string) []providerscommon.ResourceActionRoles
- func MakeRoleSubjectTestPolicies(actionMembers map[string][]string) []policysupport.PolicyInfo
- func MakeRoleSubjectTestPolicy(resourceId string, action string, roles []string) policysupport.PolicyInfo
- func MakeTestPolicies(actionMembers map[string]ActionMembers) []policysupport.PolicyInfo
- func MakeTestPolicy(resourceId string, action string, actionMembers ActionMembers) policysupport.PolicyInfo
- func MatchPolicy(exp policysupport.PolicyInfo, act policysupport.PolicyInfo) bool
- type ActionMembers
Constants ¶
View Source
const ActionGetHrUs = "GET/humanresources/us"
View Source
const ActionGetProfile = "GET/profile"
View Source
const PolicyObjectResourceId = "some-resource-id"
View Source
const ResourceHrUs = "/humanresources/us"
View Source
const ResourceProfile = "/profile"
View Source
const UserIdGetHrUs = "get-hr-us-user-id"
View Source
const UserIdGetHrUsAndProfile = "get-hr-us-profile-user-id"
View Source
const UserIdGetProfile = "get-profile-user-id"
View Source
const UserIdUnassigned1 = "unassigned-user-id-1"
View Source
const UserIdUnassigned2 = "unassigned-user-id-2"
Variables ¶
View Source
var UserEmailGetHrUs = MakeEmail(UserIdGetHrUs)
View Source
var UserEmailGetHrUsAndProfile = MakeEmail(UserIdGetHrUsAndProfile)
View Source
var UserEmailGetProfile = MakeEmail(UserIdGetProfile)
Functions ¶
func ContainsPolicies ¶
func ContainsPolicies(t *testing.T, expPolicies []policysupport.PolicyInfo, actPolicies []policysupport.PolicyInfo) bool
func HasPolicy ¶
func HasPolicy(expPolicies []policysupport.PolicyInfo, act policysupport.PolicyInfo) bool
func MakeActionMembers ¶
func MakeActionMembers() map[string]ActionMembers
func MakePolicies ¶
func MakePolicies(actionMembers map[string][]string, resourceId string) []policysupport.PolicyInfo
func MakePolicyTestUser ¶
func MakePolicyTestUsers ¶
func MakePolicyTestUsers(actionMember ActionMembers) []string
func MakePrincipalEmailMap ¶
func MakeRar ¶
func MakeRar(actionAndRes string, roles []string) providerscommon.ResourceActionRoles
func MakeRarList ¶
func MakeRarList(retActionRoles map[string][]string) []providerscommon.ResourceActionRoles
func MakeRoleSubjectTestPolicies ¶
func MakeRoleSubjectTestPolicies(actionMembers map[string][]string) []policysupport.PolicyInfo
MakeRoleSubjectTestPolicies - makes policies with passed in param actionMembers = { "GET/humanresources/us": ["role1", "role2"] }
func MakeRoleSubjectTestPolicy ¶
func MakeRoleSubjectTestPolicy(resourceId string, action string, roles []string) policysupport.PolicyInfo
func MakeTestPolicies ¶
func MakeTestPolicies(actionMembers map[string]ActionMembers) []policysupport.PolicyInfo
func MakeTestPolicy ¶
func MakeTestPolicy(resourceId string, action string, actionMembers ActionMembers) policysupport.PolicyInfo
func MatchPolicy ¶
func MatchPolicy(exp policysupport.PolicyInfo, act policysupport.PolicyInfo) bool
Types ¶
type ActionMembers ¶
Click to show internal directories.
Click to hide internal directories.