DKPermissions
@objc(DKPermissions)
public class DKPermissions : NSObject, NSCoding
In a collection, the permissions represent what actions the current user can and cannot perform.
-
trueif the user holds administrator status over the collectionDeclaration
Swift
public var admin: Bool? -
trueif the user can edit the collection’s items and metadataDeclaration
Swift
public var edit: Bool? -
trueif the user can share the collection with the publicDeclaration
Swift
public var share: Bool? -
trueif 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
responseA network response assocated with serialization
representationA key-value object representing parameters and child objects.
-
Returns an object initialized from data in a given unarchiver.
Discussion: You typically return
selffrominit(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
coderAn 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
encoderAn archiver object.
View on GitHub
Install in Dash
DKPermissions Class Reference