mirror of
https://github.com/minio/minio.git
synced 2025-11-28 13:09:09 -05:00
policy: Add Merge API (#11793)
This commit adds a new API in pkg/bucket/policy package called Merge to merge multiple policies of a user or a group into one policy document.
This commit is contained in:
@@ -27,6 +27,11 @@ import (
|
||||
// ActionSet - set of actions.
|
||||
type ActionSet map[Action]struct{}
|
||||
|
||||
// Clone clones ActionSet structure
|
||||
func (actionSet ActionSet) Clone() ActionSet {
|
||||
return NewActionSet(actionSet.ToSlice()...)
|
||||
}
|
||||
|
||||
// Add - add action to the set.
|
||||
func (actionSet ActionSet) Add(action Action) {
|
||||
actionSet[action] = struct{}{}
|
||||
|
||||
Reference in New Issue
Block a user