Access control: Display inherited folder permissions in dashboards (#46421)
This commit is contained in:
@@ -195,7 +195,6 @@ type ScopeParams struct {
|
||||
// can perform against specific resource.
|
||||
type ResourcePermission struct {
|
||||
ID int64
|
||||
ResourceID string
|
||||
RoleName string
|
||||
Actions []string
|
||||
Scope string
|
||||
@@ -206,14 +205,11 @@ type ResourcePermission struct {
|
||||
TeamEmail string
|
||||
Team string
|
||||
BuiltInRole string
|
||||
IsManaged bool
|
||||
Created time.Time
|
||||
Updated time.Time
|
||||
}
|
||||
|
||||
func (p *ResourcePermission) IsManaged() bool {
|
||||
return strings.HasPrefix(p.RoleName, "managed:")
|
||||
}
|
||||
|
||||
func (p *ResourcePermission) Contains(targetActions []string) bool {
|
||||
if len(p.Actions) < len(targetActions) {
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user