Skip to content
Snippets Groups Projects

Vueify default_membership_role_dropdown and add custom roles

Merged Alex Buijs requested to merge add-custom-roles-to-membership-role-selector into master

What does this MR do and why?

This vueifies the default_membership_role_dropdown selector and allows for custom roles to be selected and saved to SAML settings.

Issue: #417285 (closed) (Frontend part)

Screenshots or screen recordings

Before After
Screenshot_2023-11-13_at_15.54.26 SAML-Single-Sign-On-Settings--my-group--GitLab

How to set up and validate locally

  1. Enable group SAML
    gdk config set omniauth.group_saml.enabled true && gdk reconfigure && gdk restart rails-web
  2. Create a group with Ultimate license
  3. Go to http://localhost:3000/groups/${new_group}/-/settings/roles_and_permissions and create a custom role
  4. Go to http://localhost:3000/groups/${new_group}/-/saml, fill in the required form fields and select the custom role
  5. Reload the page and verify the custom role has been saved

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Alex Buijs

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Alex Buijs changed milestone to %16.6

    changed milestone to %16.6

  • assigned to @alexbuijs

  • Alex Buijs restored source branch add-custom-roles-to-membership-role-selector

    restored source branch add-custom-roles-to-membership-role-selector

  • Alex Buijs marked this merge request as draft

    marked this merge request as draft

  • Alex Buijs changed target branch from master to add-custom-roles-to-saml_providers

    changed target branch from master to add-custom-roles-to-saml_providers

  • Allure report

    allure-report-publisher generated test report!

    e2e-test-on-gdk: :white_check_mark: test report for 1da99658

    expand test summary
    +-----------------------------------------------------------------------+
    |                            suites summary                             |
    +------------------+--------+--------+---------+-------+-------+--------+
    |                  | passed | failed | skipped | flaky | total | result |
    +------------------+--------+--------+---------+-------+-------+--------+
    | Govern           | 57     | 0      | 0       | 0     | 57    | ✅     |
    | Create           | 40     | 0      | 7       | 0     | 47    | ✅     |
    | Data Stores      | 22     | 0      | 0       | 0     | 22    | ✅     |
    | Framework sanity | 0      | 0      | 1       | 0     | 1     | ➖     |
    | Plan             | 55     | 0      | 0       | 0     | 55    | ✅     |
    | Monitor          | 8      | 0      | 0       | 0     | 8     | ✅     |
    | Manage           | 0      | 0      | 1       | 0     | 1     | ➖     |
    | Verify           | 32     | 0      | 0       | 0     | 32    | ✅     |
    | Package          | 0      | 0      | 1       | 0     | 1     | ➖     |
    +------------------+--------+--------+---------+-------+-------+--------+
    | Total            | 214    | 0      | 10      | 0     | 224   | ✅     |
    +------------------+--------+--------+---------+-------+-------+--------+

    e2e-package-and-test: :x: test report for 1da99658

    expand test summary
    +-----------------------------------------------------------------------+
    |                            suites summary                             |
    +------------------+--------+--------+---------+-------+-------+--------+
    |                  | passed | failed | skipped | flaky | total | result |
    +------------------+--------+--------+---------+-------+-------+--------+
    | Package          | 225    | 1      | 17      | 0     | 243   | ❌     |
    | Create           | 543    | 0      | 67      | 0     | 610   | ✅     |
    | Fulfillment      | 8      | 0      | 69      | 0     | 77    | ✅     |
    | Verify           | 137    | 1      | 27      | 0     | 165   | ❌     |
    | Govern           | 293    | 5      | 20      | 2     | 318   | ❌     |
    | Growth           | 0      | 0      | 6       | 0     | 6     | ➖     |
    | Plan             | 249    | 0      | 10      | 0     | 259   | ✅     |
    | Systems          | 8      | 0      | 0       | 0     | 8     | ✅     |
    | Analytics        | 7      | 0      | 0       | 0     | 7     | ✅     |
    | Manage           | 40     | 1      | 9       | 14    | 50    | ❌     |
    | Configure        | 1      | 0      | 9       | 0     | 10    | ✅     |
    | Monitor          | 39     | 0      | 7       | 0     | 46    | ✅     |
    | Data Stores      | 119    | 0      | 1       | 2     | 120   | ❗     |
    | GitLab Metrics   | 2      | 0      | 1       | 0     | 3     | ✅     |
    | Release          | 15     | 0      | 3       | 0     | 18    | ✅     |
    | Secure           | 6      | 0      | 3       | 0     | 9     | ✅     |
    | Framework sanity | 0      | 0      | 5       | 0     | 5     | ➖     |
    | ModelOps         | 0      | 0      | 6       | 0     | 6     | ➖     |
    +------------------+--------+--------+---------+-------+-------+--------+
    | Total            | 1692   | 8      | 260     | 18    | 1960  | ❌     |
    +------------------+--------+--------+---------+-------+-------+--------+

    e2e-review-qa: :white_check_mark: test report for 1da99658

    expand test summary
    +-----------------------------------------------------------------------+
    |                            suites summary                             |
    +------------------+--------+--------+---------+-------+-------+--------+
    |                  | passed | failed | skipped | flaky | total | result |
    +------------------+--------+--------+---------+-------+-------+--------+
    | Create           | 8      | 0      | 2       | 0     | 10    | ✅     |
    | Plan             | 3      | 0      | 1       | 0     | 4     | ✅     |
    | Monitor          | 4      | 0      | 0       | 0     | 4     | ✅     |
    | Govern           | 3      | 0      | 0       | 0     | 3     | ✅     |
    | Data Stores      | 2      | 0      | 0       | 0     | 2     | ✅     |
    | Package          | 0      | 0      | 1       | 0     | 1     | ➖     |
    | Framework sanity | 0      | 0      | 1       | 0     | 1     | ➖     |
    +------------------+--------+--------+---------+-------+-------+--------+
    | Total            | 20     | 0      | 5       | 0     | 25    | ✅     |
    +------------------+--------+--------+---------+-------+-------+--------+
    Edited by Ghost User
  • Alex Buijs added 555 commits

    added 555 commits

    • 8ad64e8c...e79da5c1 - 545 earlier commits
    • 0c232d40 - Merge branch 'alvin-master-patch-478b' into 'master'
    • 6dace648 - Allow Jira organization admins to setup group links
    • 159f268d - Merge branch 'ft/jira-add-org-admins-support' into 'master'
    • 1a5f2786 - Remove flux custom logic
    • 1eb25671 - Merge branch '430324-remove-default-logic-for-flux-resource-fetch' into 'master'
    • 82ca998e - Merge branch 'nd/move-explain-code-to-vertex' into 'master'
    • d5fb869d - Move SSH codes troubleshooting to docs
    • a89fced8 - Merge branch 'spt-5114' into 'master'
    • abae5e36 - Add member_role_id to saml_providers
    • ef93b602 - Add saving a custom role to SAML providers

    Compare with previous version

  • Alex Buijs changed target branch from add-custom-roles-to-saml_providers to master

    changed target branch from add-custom-roles-to-saml_providers to master

  • Ghost User
  • 4 Warnings
    :warning: d8b1f9ea: Commits that change 30 or more lines across at least 3 files should describe these changes in the commit body. For more information, take a look at our Commit message guidelines.
    :warning:

    featureaddition and featureenhancement merge requests normally have a documentation change. Consider adding a documentation update or confirming the documentation plan with the Technical Writer counterpart.

    For more information, see:

    :warning: This merge request contains lines with testid selectors. Please ensure e2e:package-and-test job is run.
    :warning: This merge request contains deprecated data-qa-selector attribute. Please use data-testid attribute instead.

    Deprecated testid selectors

    The following changed lines in this MR contain testid selectors:

    ee/app/assets/javascripts/saml_providers/saml_membership_role_selector/components/saml_membership_role_selector.vue

    +      data-testid="selected-standard-role"
    +      data-testid="selected-custom-role"
    +      data-testid="default-membership-role-dropdown"

    If the e2e:package-and-test job in the qa stage has run automatically, please ensure the tests are passing. If the job has not run, please start the trigger-omnibus-and-follow-up-e2e job in the qa stage and ensure the tests in follow-up-e2e:package-and-test-ee pipeline are passing.

    For the list of known failures please refer to the latest pipeline triage issue.

    If your changes are under a feature flag, please check our Testing with feature flags documentation for instructions.

    Deprecated data-qa-selector selectors

    The following lines in this MR contain deprecated data-qa-selector selectors:

    ee/app/views/groups/saml_providers/_form.html.haml

    -      = f.select :default_membership_role, options_for_select(group.access_level_roles, saml_provider.default_membership_role), {}, class: 'form-control', data: { qa_selector: 'default_membership_role_dropdown' }

    Please ensure all deprecated data-qa-selector attributes are replaced with data-testid attributes in accordance with our Testing Guide.

    Reviewer roulette

    Changes that require review have been detected!

    Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:

    Category Reviewer Maintainer
    backend @arpitgogia profile link current availability (UTC+5.5, 4.5 hours ahead of author) @pedropombeiro profile link current availability (UTC+1, same timezone as author)
    frontend @slashmanov profile link current availability (UTC+4, 3 hours ahead of author) @eduardosanz profile link current availability (UTC+1, same timezone as author)
    QA @john.mcdonnell profile link current availability (UTC+0, 1 hour behind author) Maintainer review is optional for QA

    Please check reviewer's status!

    • available Reviewer is available!
    • unavailable Reviewer is unavailable!

    Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.

    To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.

    Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.

    If needed, you can retry the :repeat: danger-review job that generated this comment.

    Generated by :no_entry_sign: Danger

    Edited by Ghost User
  • A deleted user added Data WarehouseImpact Check label
  • Alex Buijs mentioned in issue #431326

    mentioned in issue #431326

  • Bundle size analysis [beta]

    This compares changes in bundle size for entry points between the commits a444a9f9 and 1da99658

    :sparkles: Special assets

    Entrypoint / Name Size before Size after Diff Diff in percent
    average 4.06 MB 4.06 MB - 0.0 %
    mainChunk 3.05 MB 3.05 MB - 0.0 %

    :fearful: Significant Growth: 2

    Expand
    Entrypoint / Name Size before Size after Diff Diff in percent
    pages.groups.saml_providers 301.58 KB 430.01 KB +128.42 KB 42.6 %
    pages.groups.saml_providers.saml_members.store 301.59 KB 430.02 KB +128.42 KB 42.6 %

    Your MR has at least one entrypoint growing significantly (more > 1 KB or 2%). If you write new or extend existing features, this is expected and there is nothing to worry about.

    Please consider pinging someone from the FE Foundations (@leipert, @markrian, @ohoral or @pgascouvaillancourt) for review, if you are unsure about the size increase.

    Note: We do not have exact data for a444a9f9. So we have used data from: 84f6e46c.
    The intended commit has no webpack pipeline, so we chose the last commit with one before it.

    Please look at the full report for more details


    Read more about how this report works.

    Generated by :no_entry_sign: Danger

    Edited by Ghost User
  • Alex Buijs added 1 commit

    added 1 commit

    • ef7d2c33 - Add saving a custom role to SAML providers

    Compare with previous version

  • Alex Buijs added 274 commits

    added 274 commits

    Compare with previous version

  • Alex Buijs added 205 commits

    added 205 commits

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading