Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complete UIWindowRequestPermission implementation for general permission requests #821

Open
jelveh opened this issue Oct 31, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@jelveh
Copy link
Contributor

jelveh commented Oct 31, 2024

The UIWindowRequestPermission component needs to be completed to serve as a standardized permission request dialog that apps can use to request various types of permissions from users. This will provide a consistent and secure way for apps to request permissions across the Puter platform.

Current State

The UIWindowRequestPermission exists but needs to be finalized and expanded to handle different types of permission requests in a flexible and reusable way.

Requirements

  • Generic permission request dialog that can be customized for different permission types
  • Clear presentation of what permission is being requested
  • Explanation of why the permission is needed
  • Standard accept/deny actions
  • Ability to remember user's choice (where appropriate)
  • Consistent styling with Puter's design system

Proposed Permission Types Support

  • File system access (read/write to specific directories)
  • Network access
  • System API access
  • Background processing permissions
  • User data access (email, etc)
@jelveh jelveh added the enhancement New feature or request label Oct 31, 2024
@rowin-C
Copy link
Contributor

rowin-C commented Dec 8, 2024

Hey has this been worked on ? cause in UIWindowRequestPermission.js there was an implementation of Dialog box with accept and deny options

@jelveh
Copy link
Contributor Author

jelveh commented Dec 8, 2024

@rowin-C that is the incomplete implementation. Did you want to pick it up?

@rowin-C
Copy link
Contributor

rowin-C commented Dec 9, 2024

Sure I'll start going through the code.

@rowin-C
Copy link
Contributor

rowin-C commented Dec 12, 2024

hey @jelveh , i have understood that i have to update the function so that it works for different types of permission and not only the three . (am i correct ?)

also i wanted to what is origin ?
image

in harcoded-permission there is
image

is "id" == origin ?

@jelveh
Copy link
Contributor Author

jelveh commented Dec 13, 2024

That's a good question. origin is the origin of a website trying to authenticate using Puter. As you may know, Puter.js can be used both on Puter and on 3rd-party websites. We use the origin part of a 3rd-party website's URL as the identifier. So if a website with URL https://www.example.com/app/index.html tried to authenticate using Puter we'd record their origin as https://www.example.com

url-parts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants