Skip to content

Improve default Parse.User security #7292

Closed
@dblythy

Description

@dblythy

New Feature / Enhancement Checklist

Current Limitation

By default, when a new user is created, it will have public R, unless overriden by a cloud function.

Feature / Enhancement Description

Currently, to secure users, you need to create a cloud function. In my view, the reverse should be the case - that by default, the Parse.User ACL is R+W false, and if you want the "old" functionality, you should use a cloud function.

The changelog would be:

Breaking Change: Parse.User now defaults to public R false on signup. To achieve public read on sign up, use a cloud trigger:

Parse.Cloud.beforeSave(Parse.User, ({object}) => {
  if (!object.existed()) {
    const acl = new Parse.ACL();
    object.setPublicReadAccess(true);
    object.setACL(acl);
  }
});

Alternatives / Workarounds

Create a cloud function to prevent public R access on signup. It's my view this should be reversed - a cloud function shouldn't be needed to secure the user class.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:featureNew feature or improvement of existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions