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

Add permission concept for links #168

Closed

Conversation

biru-codeastromer
Copy link

@biru-codeastromer biru-codeastromer commented Jan 2, 2025

Fixes #78

Add permission concept for links to restrict access based on user roles.

Changes made

1. CustomHeaderConfiguration.java**

  • Add a new permission VIEW_LINK.
  • Update the getLinks method to filter links based on user permissions.

2. AppNavLink.java**

  • Add a new field permission.
  • Update the constructor to include the permission field.
  • Update the getLinkUrl method to check for the permission field.

3. config.jelly

  • Add a new entry for the permission field.

Fixes #78

Add permission concept for links to restrict access based on user roles.

* **CustomHeaderConfiguration.java**
  - Add a new permission `VIEW_LINK`.
  - Update the `getLinks` method to filter links based on user permissions.

* **AppNavLink.java**
  - Add a new field `permission`.
  - Update the constructor to include the `permission` field.
  - Update the `getLinkUrl` method to check for the `permission` field.

* **config.jelly**
  - Add a new entry for the `permission` field.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/jenkinsci/customizable-header-plugin/issues/78?shareId=XXXX-XXXX-XXXX-XXXX).
@biru-codeastromer biru-codeastromer requested a review from a team as a code owner January 2, 2025 21:47
@biru-codeastromer biru-codeastromer deleted the add-permission branch January 2, 2025 22:03
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.

permission concept for links
1 participant