-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Closed
Description
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:
So my suggestions:
- move more logic from
ScopePermission
(SP) toexpo-permission
(P). Now, the decision on how to check given permission came fromScopePermission
(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 ofLocationPemission
).
We could make a permission family, for example:
LocationPermission will be divided intoforeground
andbackground
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.