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

feat: add optional authorization at page level #165

Closed

Conversation

shawnheide
Copy link

Hello, I've been using this package for a bit and was having issues with using the settings globally, but also restricting access to some of the pages.

I added an authorization parameter to the addSettingsFields methods and used it to filter the pages on the Nova side. That way the settings are available outside Nova, but still restricted to people with permission. There is also a config for whether the default should be to hide or show if authorization is null.

Let me know if you think it's useful or if there's anything that I should change. No worries if it's too far out of scope for the project. Thanks!

@shawnheide
Copy link
Author

Sorry, I think this was a bit premature. I haven't quite figured out where to register the settings to have it available globally and have the user accessible to authorize.

It seems that the settings need to be registered in the booted to be globally accessible and in serving to handle permissions. Happy to hear other ideas.

I think something like a SettingsPage described here would be helpful.

@shawnheide shawnheide closed this Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant