MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / addRole

Method addRole

rest/revocation_test.go:48–56  ·  view source on GitHub ↗
(user, role string)

Source from the content-addressed store, hash-verified

46)
47
48func (tester *ChannelRevocationTester) addRole(user, role string) {
49 if tester.roles.Roles == nil {
50 tester.roles.Roles = map[string][]string{}
51 }
52
53 tester.roles.Roles[user] = append(tester.roles.Roles[user], fmt.Sprintf("role:%s", role))
54 tester.roleVersion = tester.restTester.UpdateDoc("userRoles", tester.roleVersion, string(base.MustJSONMarshal(tester.test, tester.roles)))
55 tester.restTester.WaitForPendingChanges()
56}
57
58func (tester *ChannelRevocationTester) removeRole(user, role string) {
59 delIdx := -1

Callers 15

TestRevocationScenario1Function · 0.45
TestRevocationScenario2Function · 0.45
TestRevocationScenario3Function · 0.45
TestRevocationScenario4Function · 0.45
TestRevocationScenario5Function · 0.45
TestRevocationScenario6Function · 0.45
TestRevocationScenario7Function · 0.45
TestRevocationScenario8Function · 0.45
TestRevocationScenario9Function · 0.45
TestRevocationScenario10Function · 0.45
TestRevocationScenario11Function · 0.45
TestRevocationScenario12Function · 0.45

Calls 3

MustJSONMarshalFunction · 0.92
UpdateDocMethod · 0.80
WaitForPendingChangesMethod · 0.45

Tested by

no test coverage detected