DKPermissions
@objc(DKPermissions)
public class DKPermissions : NSObject, NSCoding
In a collection, the permissions represent what actions the current user can and cannot perform.
-
true
if the user holds administrator status over the collectionDeclaration
Swift
public var admin: Bool?
-
true
if the user can edit the collection’s items and metadataDeclaration
Swift
public var edit: Bool?
-
true
if the user can share the collection with the publicDeclaration
Swift
public var share: Bool?
-
true
if the user can leave the collectionDeclaration
Swift
public var leave: Bool?
-
`true if the user can delete the collection
Declaration
Swift
public var delete: Bool?
-
Serializes a new instance from the provided network response and key-value representation. The representation is validated for the required parameters, then fills in optional parameters as necessary.
Declaration
Swift
public init?(response: HTTPURLResponse, representation: Any)
Parameters
response
A network response assocated with serialization
representation
A key-value object representing parameters and child objects.
-
Returns an object initialized from data in a given unarchiver.
Discussion: You typically return
self
frominit(coder:)
. If you have an advanced need that requires substituting a different object after decoding, you can do so inawakeAfter(using:)
.
Declaration
Swift
public required init(coder aDecoder: NSCoder)
Parameters
coder
An unarchiver object.
Return Value
self
, initialized using the data incoder
. -
Encodes the receiver using a given archiver.
Declaration
Swift
public func encode(with aCoder: NSCoder)
Parameters
encoder
An archiver object.