[MM-63428] add access control policy store (#30597)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
3eb854c58d
Коммит
10b1f4c5ac
@@ -95,6 +95,7 @@ type Store interface {
|
||||
PropertyGroup() PropertyGroupStore
|
||||
PropertyField() PropertyFieldStore
|
||||
PropertyValue() PropertyValueStore
|
||||
AccessControlPolicy() AccessControlPolicyStore
|
||||
}
|
||||
|
||||
type RetentionPolicyStore interface {
|
||||
@@ -1107,6 +1108,14 @@ type PropertyValueStore interface {
|
||||
DeleteForField(id string) error
|
||||
}
|
||||
|
||||
type AccessControlPolicyStore interface {
|
||||
Save(c request.CTX, policy *model.AccessControlPolicy) (*model.AccessControlPolicy, error)
|
||||
Delete(c request.CTX, id string) error
|
||||
SetActiveStatus(c request.CTX, id string, active bool) (*model.AccessControlPolicy, error)
|
||||
Get(c request.CTX, id string) (*model.AccessControlPolicy, error)
|
||||
GetAll(rctxc request.CTX, opts GetPolicyOptions) ([]*model.AccessControlPolicy, error)
|
||||
}
|
||||
|
||||
// ChannelSearchOpts contains options for searching channels.
|
||||
//
|
||||
// NotAssociatedToGroup will exclude channels that have associated, active GroupChannels records.
|
||||
@@ -1199,3 +1208,11 @@ type ThreadMembershipImportData struct {
|
||||
// UnreadMentions is the number of unread mentions to set the UnreadMentions field to.
|
||||
UnreadMentions int64
|
||||
}
|
||||
|
||||
// GetPolicyOptions contains options for filtering policy records.
|
||||
type GetPolicyOptions struct {
|
||||
// ParentID will filter policy records where they inherit parent with PolicyID.
|
||||
ParentID string
|
||||
// Type will filter policy records where they are associated with the Type.
|
||||
Type string
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user