ItemPolicyValue
Enumeration of values available for configuring Policies for Items
Constants
rawValue : ``
The corresponding value of the raw type.
A new instance initialized with rawValue
will be equivalent to this instance. For example:
all : Enum Case
All Context users can perform this action
none : Enum Case
No one can perform this action
default : Enum Case
Take the default value
inherit : Enum Case
Take the value from the Context
owner : Enum Case
Only Container owner can perform this action
itemOwner : Enum Case
Only item owner can perform this action
user : Enum Case
All Container users can perform this action
manager : Enum Case
All Container managers can perform this action
complex(_:) : Enum Case
This case sould not be used directly, It’s here to represent values generated by and(_:)
&or(_:)
Methods
init(rawValue:)
Creates a new instance with the specified raw value.
If there is no value of the type that corresponds with the specified raw value, this initializer returns nil
. For example:
public init?(rawValue: std.string)
Name | Type | Description |
---|---|---|
rawValue | std.string | The raw value to use for the new instance. |
andMutating(_:)
Changes self
to .complex
, where the associated value consists of self.rawValue
and val.rawValue
connected with &
.
public mutating func andMutating(
_ val:ItemPolicyValue
) -> ItemPolicyValue
Name | Type | Description |
---|---|---|
val | ItemPolicyValue | Policy value to be appended with “AND” operator |
Type | Description |
---|---|
ItemPolicyValue | modified `self` |
orMutating(_:)
Changes self
to .complex
, where the associated value consists of self.rawValue
and val.rawValue
connected with ,
.
public mutating func orMutating(
_ val:ItemPolicyValue
) -> ItemPolicyValue
Name | Type | Description |
---|---|---|
val | ItemPolicyValue | Policy value to be appended with “OR” operator |
Type | Description |
---|---|
ItemPolicyValue | modified `self` |
and(_:)
Creates a new ItemPolicyValue.complex
with the the associated value consisting of self.rawValue
and val.rawValue
connected with &
.
public func and(
_ val:ItemPolicyValue
) -> ItemPolicyValue
Name | Type | Description |
---|---|---|
val | ItemPolicyValue | Policy value to be appended with “AND” operator |
Type | Description |
---|---|
ItemPolicyValue | new `.complex` `ItemPolicyValue` |
or(_:)
Creates a new ItemPolicyValue.complex
with the the associated value consisting of self.rawValue
and val.rawValue
connected with &
public func or(
_ val:ItemPolicyValue
) -> ItemPolicyValue
Name | Type | Description |
---|---|---|
val | ItemPolicyValue | Policy value to be appended with “OR” operator |
Type | Description |
---|---|
ItemPolicyValue | modified `self` |