invalidateAllPrincipals invalidates computed channels and roles for all users/roles, for the specified collections:
(ctx context.Context, collectionNames base.ScopeAndCollectionNames, endSeq uint64)
| 1922 | |
| 1923 | // invalidateAllPrincipals invalidates computed channels and roles for all users/roles, for the specified collections: |
| 1924 | func (dbCtx *DatabaseContext) invalidateAllPrincipals(ctx context.Context, collectionNames base.ScopeAndCollectionNames, endSeq uint64) { |
| 1925 | base.InfofCtx(ctx, base.KeyAll, "Invalidating channel caches of users/roles...") |
| 1926 | users, roles, _ := dbCtx.AllPrincipalIDs(ctx) |
| 1927 | for _, name := range users { |
| 1928 | dbCtx.invalUserRolesAndChannels(ctx, name, collectionNames, endSeq) |
| 1929 | } |
| 1930 | for _, name := range roles { |
| 1931 | dbCtx.invalRoleChannels(ctx, name, collectionNames, endSeq) |
| 1932 | } |
| 1933 | } |
| 1934 | |
| 1935 | // invalUserChannels invalidates a user's computed channels for the specified collections |
| 1936 | func (dbCtx *DatabaseContext) invalUserChannels(ctx context.Context, username string, collections base.ScopeAndCollectionNames, invalSeq uint64) { |