Skip to content

[Permissions] Major rework #4972

@lukmccall

Description

@lukmccall

I will try to make permissions rework.

Here I post some information about what and how I want to change.
It would be nice if you provide me some feedback, then we figure out how new permissions will look like.

Firstly I want to focused on iOS implementation.

Here is our current flow graph for permission asking:

PermissionsFlow

So my suggestions:

  • move more logic from ScopePermission (SP) to expo-permission (P). Now, the decision on how to check given permission came from ScopePermission (SP). This solution forced a lot of jumps between SP and P. If we move decision logic to P we could treat SP like iOS extension, which provides API for permissions per experience.
  • treat "particle permission" as a full-fledged permission type (Location in the foreground will be a subtype of LocationPemission).
    We could make a permission family, for example:
    LocationPermission will be divided into foreground and background permission, so the user will be able to ask for all 3 permissions (LocationPermission will still be available to the user).
    • If he asked for the main permission, this will be treated as asking for all children permissions.
    • In a situation when he asked for child permission and the current platform doesn't support the required type of permission, the system will ask for the main permission.

For now, I will try to refactor the current permissions code to make it more readable.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions