LCACL
public final class LCACL : NSObject, LCValue, LCValueExtension
extension LCACL: LCValueConvertible
LeanCloud access control lists type.
You can use it to set access control lists on an object.
-
Undocumented
Declaration
Swift
public override init()
-
Undocumented
Declaration
Swift
public required init?(coder aDecoder: NSCoder)
-
Undocumented
Declaration
Swift
public func encode(with aCoder: NSCoder)
-
Undocumented
Declaration
Swift
public func copy(with zone: NSZone?) -> Any
-
Undocumented
Declaration
Swift
public override func isEqual(_ object: Any?) -> Bool
-
Declaration
Swift
public var jsonValue: Any { get }
-
Declaration
Swift
public var rawValue: Any { get }
-
Permission type.
See moreDeclaration
Swift
public struct Permission : OptionSet
-
Get access permission for public.
Declaration
Swift
public func getAccess(_ permission: Permission) -> Bool
Parameters
permission
The permission that you want to get.
Return Value
true if the permission is allowed, false otherwise.
-
Set access permission for public.
Declaration
Swift
public func setAccess(_ permission: Permission, allowed: Bool)
Parameters
permission
The permission to be set.
allowed
A boolean value indicates whether permission is allowed or not.
-
Get access permission for user.
Declaration
Swift
public func getAccess(_ permission: Permission, forUserID userID: String) -> Bool
Parameters
permission
The permission that you want to get.
userID
The user object ID for which you want to get.
Return Value
true if the permission is allowed, false otherwise.
-
Set access permission for user.
Declaration
Swift
public func setAccess(_ permission: Permission, allowed: Bool, forUserID userID: String)
Parameters
permission
The permission to be set.
allowed
A boolean value indicates whether permission is allowed or not.
userID
The user object ID for which the permission will be set.
-
Get access permission for role.
Declaration
Swift
public func getAccess(_ permission: Permission, forRoleName roleName: String) -> Bool
Parameters
permission
The permission that you want to get.
roleName
The role name for which you want to get.
Return Value
true if the permission is allowed, false otherwise.
-
Set access permission for role.
Declaration
Swift
public func setAccess(_ permission: Permission, allowed: Bool, forRoleName roleName: String)
Parameters
permission
The permission to be set.
allowed
A boolean value indicates whether permission is allowed or not.
roleName
The role name for which the permission will be set.
-
Declaration
Swift
public var lcValue: LCValue { get }