fixed multiple roles in 1 policy
This commit is contained in:
+7
-8
@@ -77,12 +77,11 @@ type AuthorizationResult struct {
|
||||
|
||||
// CachedAuthorizationService adds caching layer to authorization
|
||||
type CachedAuthorizationService struct {
|
||||
Repo interface{} // repository.PermissionRepository
|
||||
PermissionCache map[string]*Permission // key: "resource:action"
|
||||
PolicyCache map[int][]PolicyAttribute
|
||||
UserAttrCache map[string]map[string]string // key: userID
|
||||
CacheMutex interface{} // sync.RWMutex
|
||||
UserAttrMutex interface{} // sync.RWMutex
|
||||
CacheExpiry time.Duration
|
||||
LastCacheRefresh time.Time
|
||||
PermissionCache map[string]*Permission `json:"-"` // key: "resource:action"
|
||||
PolicyCache map[int][]PolicyAttribute `json:"-"`
|
||||
UserAttrCache map[string]map[string]string `json:"-"` // key: userID
|
||||
CacheMutex interface{} `json:"-"` // sync.RWMutex
|
||||
UserAttrMutex interface{} `json:"-"` // sync.RWMutex
|
||||
CacheExpiry time.Duration `json:"cache_expiry"`
|
||||
LastCacheRefresh time.Time `json:"last_cache_refresh"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user