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

Better Restriction for Tag Protected Discussions #14

Merged
merged 14 commits into from
May 10, 2024

Conversation

Yippy
Copy link
Contributor

@Yippy Yippy commented May 9, 2024

Closed #12 #13

New Permissions Settings

Toggle user group for each settings, instead of using a on or off switch.
image

Provide Access for Sharing Link depending on User Roles

Everyone
image
Admin Only
image

User Page Post Page is now protected, you can choose to show the protected

image

Data API is now restricted for protected Tags

The data is still displaying IDs for objects, but the details are now cleared from view. Please note that API will pretty much strip all data away, unless you are viewing the Discussion Page with the Correct User role for URL Sharing.
image

Yippy added 5 commits May 7, 2024 11:10
Cleanup index.js for forum with extended functions files to separate extended or override sections.
…r not loading extended Tag. Instead create ProtectedTag instances for usage in tagLabel and tagsLabel
…switch, able to display different view for different User Permission Groups

Added ReferrerFinder helper class to find which section is the API is loaded from
Added User Policy to simplify the isUnlocked logic.
Added tooltipForPermission helper class to produce tooltip for both Post and Discussion List for Protected Tags
…scussion and Posts

Added restricted view of Discussion Title and Post Contents for protected tags.
Copy link

gitguardian bot commented May 9, 2024

⚠️ GitGuardian has uncovered 3 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
- Generic Password 33580c6 js/dist/forum.js View secret
- Generic Password 33580c6 js/dist/forum.js View secret
- Generic Password 33580c6 js/dist/forum.js View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@Yippy
Copy link
Contributor Author

Yippy commented May 9, 2024

Forgot to mentioned that this will fix #12 and #13 Issues.

Should I put myself as a contributor for this extension?

@datlechin
Copy link
Owner

datlechin commented May 9, 2024

Should I put myself as a contributor for this extension?

Thank you for your contribution!

It looks great.

I'll go ahead and merge your changes and credit you as the contributor for this extension.

P.S: For your next PR, you won't need to push files in the dist directory, as the bot will handle it for you.

@datlechin datlechin self-requested a review May 9, 2024 16:49
@Yippy
Copy link
Contributor Author

Yippy commented May 9, 2024

Please wait, I found a bug

@datlechin
Copy link
Owner

I'll mark the PR as a draft. Once you're finished, you can mark it as ready for review.

@datlechin datlechin marked this pull request as draft May 9, 2024 16:56
@Yippy Yippy marked this pull request as ready for review May 9, 2024 18:43
@Yippy
Copy link
Contributor Author

Yippy commented May 9, 2024

I've fixed the issue when using Theme extension that doesn't like null string, this is now ready. I haven't updated the dist with the latest changes.

@Yippy
Copy link
Contributor Author

Yippy commented May 10, 2024

PR is ready, tidied most it now.

@datlechin
Copy link
Owner

Thank you!

@datlechin datlechin merged commit ee35866 into datlechin:main May 10, 2024
2 of 4 checks passed
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.

Hide posts that are from Protected Discussion
2 participants