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

Resolving a reference to an undefined lockedExist and adding for project memberships with custom permissions #13543

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

codyrancher
Copy link
Contributor

@codyrancher codyrancher commented Feb 28, 2025

Summary

Resolving a reference to an undefined lockedExist and adding for project memberships with custom permissions

Fixes #12828

Occurred changes and/or fixed issues

Really just correcting an undefined reference.

Technical notes summary

The majority of this change is adding the infrastructure to write a test

Areas or cases that should be tested

Adding project members with custom permissions. You can add them from the Cluster and Project members page or from the Project edit page.

Screenshot/Video

project-member-custom-permissions.mp4

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes

…for project memberships with custom permissions

Fixes rancher#12828
@@ -194,7 +194,7 @@ export default {
return this.customPermissions.reduce((acc, customPermissionsItem) => {
const lockedExist = this.roleTemplates.find((roleTemplateItem) => roleTemplateItem.id === customPermissionsItem.key);

if (lockedExist.locked) {
if (lockedExist && lockedExist.locked) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is the actual fix. Everything else is just instrumenting/testing.

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.

Projects/Namespaces: Unable to add project member using custom option
1 participant