MCPcopy Index your code
hub / github.com/coder/coder / Equal

Method Equal

coderd/rbac/object.go:93–116  ·  view source on GitHub ↗
(b Object)

Source from the content-addressed store, hash-verified

91}
92
93func (z Object) Equal(b Object) bool {
94 if z.ID != b.ID {
95 return false
96 }
97 if z.Owner != b.Owner {
98 return false
99 }
100 if z.OrgID != b.OrgID {
101 return false
102 }
103 if z.Type != b.Type {
104 return false
105 }
106
107 if !equalACLLists(z.ACLUserList, b.ACLUserList) {
108 return false
109 }
110
111 if !equalACLLists(z.ACLGroupList, b.ACLGroupList) {
112 return false
113 }
114
115 return true
116}
117
118func equalACLLists(a, b map[string][]policy.Action) bool {
119 if len(a) != len(b) {

Callers 15

TestRecoverFunction · 0.45
TestUserSecretAuditFunction · 0.45
TestUserLatencyInsightsFunction · 0.45
TestGenericInsights_RBACFunction · 0.45
TestGetUserStatusCountsFunction · 0.45
TestExternalAuthByIDFunction · 0.45
TestExternalAuthDeviceFunction · 0.45

Calls 1

equalACLListsFunction · 0.85

Tested by 15

TestRecoverFunction · 0.36
TestUserSecretAuditFunction · 0.36
TestUserLatencyInsightsFunction · 0.36
TestGenericInsights_RBACFunction · 0.36
TestGetUserStatusCountsFunction · 0.36
TestExternalAuthByIDFunction · 0.36
TestExternalAuthDeviceFunction · 0.36