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

Role based access frontend #1157

Merged
merged 14 commits into from
Sep 13, 2023
Merged

Conversation

joanagmaia
Copy link
Contributor

@joanagmaia joanagmaia commented Jul 21, 2023

Changes proposed ✍️

What

🤖 Generated by Copilot at 6b9fa2b

This pull request implements the new admin panel feature, which allows project admin users to view and manage their project groups, automations, and API keys. It also removes unused code and features, such as the settings and password-related pages, and improves code consistency and security. Some of the main files affected are lf-admin-panel-page.vue, lf-project-groups-list-page.vue, lf-project-groups-page.vue, integration-routes.js, and profile-form-page.vue.

🤖 Generated by Copilot at 6b9fa2b

We are the masters of the code, we purge the obsolete
We create the admin panel, we control the project groups
We guard the routes with permissions, we filter by the roles
We are the lords of the segments, we rock the LF module

Why

How

🤖 Generated by Copilot at 6b9fa2b

  • Remove unused code related to user roles, settings, and email verification (link, link, link, link, link, link, link, link, link, link, link, link, link, link)
  • Create a new component lf-admin-panel-page.vue that renders the admin panel page with tabs for project groups, automations, and API keys (link)
  • Change the adminProjectGroups route to point to the new adminPanel route with the project-groups query parameter (link, link, link)
  • Add tabs for project admin users to switch between their own project groups and all project groups in lf-project-groups-list-page.vue (link, link)
  • Add search inputs for project admin users to search for project groups within their selected tab in lf-project-groups-list-page.vue (link)
  • Add adminOnly parameter to listProjectGroups method and pass it to LfService.queryProjectGroups method to filter project groups by user's role (link, link, link, link)
  • Add listUserProjectGroups and searchUserProjectGroup methods to list and search project groups that the user is an admin of (link, link)
  • Add userProjectGroups object to state and state interface to store project groups that the user is an admin of (link, link)
  • Add isProjectAdminUser computed property to check user's role using PermissionChecker class and Roles enum in lf-project-groups-list-page.vue and lf-project-groups-page.vue (link, link, link)
  • Add beforeEnter hooks to integrationProjectGroup and projectGroupsList routes to check user's access to project group using hasAccessToProjectGroup function (link, link, link, link)
  • Add v-if directives to el-button, el-divider, el-tooltip, and router-link elements to check user's permission to access admin panel and access to project group using PermissionChecker class and hasAccessToProjectGroup function (link, link, link, link, link, link, link, link, link)
  • Replace app-page-wrapper element with div element with pt-6 class in lf-project-groups-page.vue to remove extra padding and margin (link, link)
  • Add mb-9 class conditionally to div element in lf-project-groups-list-page.vue to adjust margin based on user's role (link)
  • Remove app-lf-search-input element from lf-project-groups-page.vue and lf-project-groups-list-page.vue as it is not used or moved to another location (link, link)
  • Change class of el-button element in lf-project-groups-list-page.vue from btn--secondary to btn--primary to make it more prominent (link)
  • Replace double quotes with single quotes in import statements in terms-and-privacy.vue to improve code consistency and style (link)

Checklist ✅

  • Label appropriately with Feature, Improvement, or Bug.
  • Add screehshots to the PR description for relevant FE changes
  • New backend functionality has been unit-tested.
  • API documentation has been updated (if necessary) (see docs on API documentation).
  • Quality standards are met.

@joanagmaia joanagmaia self-assigned this Jul 21, 2023
@joanagmaia joanagmaia added the Feature Created by Linear-GitHub Sync label Jul 21, 2023
@joanagmaia joanagmaia force-pushed the feature/role-based-access-frontend branch from d136564 to 4e3422b Compare July 21, 2023 17:00
@sausage-todd sausage-todd merged commit d3cbde8 into crowd-linux Sep 13, 2023
6 checks passed
@sausage-todd sausage-todd deleted the feature/role-based-access-frontend branch September 13, 2023 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Created by Linear-GitHub Sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants