Skip to content

Commit 0e92bff

Browse files
committed
Adds r/w accessors in swift for the PFACL
fixes #1083
1 parent 048be1a commit 0e92bff

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

Parse/Parse/PFACL.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ NS_ASSUME_NONNULL_BEGIN
4747
/**
4848
Controls whether the public is allowed to read this object.
4949
*/
50-
@property (nonatomic, assign, getter=getPublicReadAccess) BOOL publicReadAccess;
50+
@property (nonatomic, assign, getter=getPublicReadAccess) BOOL publicReadAccess NS_SWIFT_NAME(hasPublicReadAccess);
5151

5252
/**
5353
Controls whether the public is allowed to write this object.
5454
*/
55-
@property (nonatomic, assign, getter=getPublicWriteAccess) BOOL publicWriteAccess;
55+
@property (nonatomic, assign, getter=getPublicWriteAccess) BOOL publicWriteAccess NS_SWIFT_NAME(hasPublicWriteAccess);
5656

5757
///--------------------------------------
5858
#pragma mark - Controlling Access Per-User

Parse/Tests/Other/Swift/SwiftSubclass.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,12 @@ public class SwiftSubclass: PFObject, PFSubclassing {
2929
func test_validateSwiftImport() {
3030
let _ = SwiftSubclass(withoutDataWithObjectId: "")
3131
}
32+
33+
func test_properACLSetters() {
34+
let acl = PFACL()
35+
acl.hasPublicReadAccess = true
36+
acl.hasPublicWriteAccess = true
37+
_ = acl.hasPublicWriteAccess
38+
_ = acl.hasPublicReadAccess
39+
}
3240
}

0 commit comments

Comments
 (0)