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

Policy > Manage automations: maintainers can't turn on/off calendar automations for policies #23448

Closed
iansltx opened this issue Nov 1, 2024 · 17 comments
Assignees
Labels
bug Something isn't working as documented ~frontend Frontend-related issue. #g-orchestration Orchestration product group :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. ~released bug This bug was found in a stable release.
Milestone

Comments

@iansltx
Copy link
Member

iansltx commented Nov 1, 2024


Fleet version: 4.57.0+ (installs), 4.58.0+ (scripts)


💥  Actual behavior

Per @RachelElysia's comment, maintainers can't set policy automations for software installs or script runs in the UI, though they can in the API. Per today's design review outcome, the API permission is the reasonable one here, so we should match that in the UI.

🧑‍💻  Steps to reproduce

  1. Add a policy to a team
  2. While logged in as a Maintainer, observe that policy automations on the team are unavailable

🛠️ To fix

Per our discussion, I've created the following two wireframes:

Calendar event modal for maintainer roles

  1. Removed the enable switch
  2. Removed webhook URL
  3. Note: I've retained the preview link and have it rendering on the same line as the "Show example payload" action. LMK if y'all see any issues with this.

Mange automations dropdown for maintainer roles

  1. Disabled the "Calendar events" option and added a tooltip to tell a maintainer how to enable this. LMK what y'all think of verbiage.
  2. Removed the "Other workflows" option.
  3. Question: I notice that there is a case in which policies are not added to a team, which greys out the "Calendar events" and shows a tooltip to Select a team to manage. I imagine this tooltip will take precedent and then the tooltip rendered here would show only for maintainers that have put a policy on a team who do not have access to Calendar events. Thoughts?
@iansltx iansltx added #g-endpoint-ops Endpoint ops product group :incoming New issue in triage process. :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. :reproduce Involves documenting reproduction steps in the issue bug Something isn't working as documented ~frontend Frontend-related issue. ~released bug This bug was found in a stable release. labels Nov 1, 2024
@iansltx iansltx changed the title Maintainers should be able to apply install/script automations Maintainers should be able to apply install/script automations from the UI Nov 1, 2024
@RachelElysia
Copy link
Member

Please add your planning poker estimate with Zenhub @jacobshandling

@RachelElysia
Copy link
Member

Add quick test if time allows

@RachelElysia
Copy link
Member

RachelElysia commented Nov 13, 2024

I just tested this manually, maintainers have access to the API for install software and run script but not for calendar events and other workflows (errors: [{name: "base", reason: "forbidden"}].

I'm thinking for maintainers, we should show to the dropdown but disable calendar events and other workflows with a tooltip OR we should remove calendar events and other workflows from the dropdown.

wdyt? @rachaelshaw / @noahtalerman

Visual of admin dropdown and what works for maintainers and what doesnt:
Screenshot 2024-11-13 at 4 31 26 PM

@RachelElysia RachelElysia self-assigned this Nov 13, 2024
@RachelElysia
Copy link
Member

Adding this to my plate since I think we should get this into 4.60 major release as we are preventing major flows for maintainers in the UI that are available in the API.

@rachaelshaw
Copy link
Member

Here's the permissions we have documented, looks like this doesn't quite match up with what @RachelElysia found (says maintainers can manage calendar events):
Screenshot 2024-11-14 at 11 25 24 AM

@iansltx
Copy link
Member Author

iansltx commented Nov 14, 2024

@rachaelshaw Calendar events permissions mismatch is covered in #23483. The issue there is that the current modal covers both things that a maintainer is allowed to do (toggling per policy) and things that require an admin (setting the web hook and turning on/off calendar integrations entirely).

@RachelElysia
Copy link
Member

Check other workflows APIs if maintainer has access to either of them

@RachelElysia
Copy link
Member

@rachaelshaw decide if we should try to fix in 4.60

@RachelElysia
Copy link
Member

related to #23483

@noahtalerman noahtalerman changed the title Maintainers should be able to apply install/script automations from the UI Policy > Manage automations: maintainers can't turn on/off calendar automations for policies Nov 15, 2024
@noahtalerman noahtalerman assigned eugkuo and unassigned RachelElysia Nov 15, 2024
@noahtalerman noahtalerman added :product Product Design department (shows up on 🦢 Drafting board) and removed :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. labels Nov 15, 2024
@sharon-fdm sharon-fdm removed the :reproduce Involves documenting reproduction steps in the issue label Nov 18, 2024
@eugkuo
Copy link
Contributor

eugkuo commented Nov 19, 2024

@RachelElysia & @rachaelshaw

Per our discussion, I've created the following two wireframes:

  1. Calendar event modal for maintainer roles
    a. Removed the enable switch
    b. Removed webhook URL
    c. Note: I've retained the preview link and have it rendering on the same line as the "Show example payload" action. LMK if y'all see any issues with this.
  2. Mange automations dropdown for maintainer roles
    a. Disabled the "Calendar events" option and added a tooltip to tell a maintainer how to enable this. LMK what y'all think of verbiage.
    b. Removed the "Other workflows" option.
    c. Question: I notice that there is a case in which policies are not added to a team, which greys out the "Calendar events" and shows a tooltip to Select a team to manage. I imagine this tooltip will take precedent and then the tooltip rendered here would show only for maintainers that have put a policy on a team who do not have access to Calendar events. Thoughts?

LMK what you think. I'm also not sure of the process on how to move tickets along. I'm assuming this ticket should not move until we've all approved the above, after which I'll move these sections to the "Ready" page?

@eugkuo eugkuo removed the :product Product Design department (shows up on 🦢 Drafting board) label Nov 22, 2024
@eugkuo eugkuo added the :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. label Nov 22, 2024
@eugkuo eugkuo assigned sharon-fdm and unassigned eugkuo Nov 22, 2024
@sharon-fdm sharon-fdm removed their assignment Nov 25, 2024
@sharon-fdm sharon-fdm removed the :incoming New issue in triage process. label Dec 9, 2024
@RachelElysia
Copy link
Member

Adding to my plate since I already started this and a little blocked this morning on any current tickets.

@RachelElysia RachelElysia self-assigned this Dec 9, 2024
@RachelElysia
Copy link
Member

RachelElysia commented Dec 9, 2024

Per our discussion, I've created the following two wireframes:

Calendar event modal for maintainer roles
a. Removed the enable switch
b. Removed webhook URL
c. Note: I've retained the preview link and have it rendering on the same line as the "Show example payload" action. LMK if y'all see any issues with this.
Mange automations dropdown for maintainer roles
a. Disabled the "Calendar events" option and added a tooltip to tell a maintainer how to enable this. LMK what y'all think of verbiage.
b. Removed the "Other workflows" option.
c. Question: I notice that there is a case in which policies are not added to a team, which greys out the "Calendar events" and shows a tooltip to Select a team to manage. I imagine this tooltip will take precedent and then the tooltip rendered here would show only for maintainers that have put a policy on a team who do not have access to Calendar events. Thoughts?
LMK what you think. I'm also not sure of the process on how to move tickets along. I'm assuming this ticket should not move until we've all approved the above, after which I'll move these sections to the "Ready" page?

I was able to implement as you described and looks good to me! @eugkuo

@RachelElysia RachelElysia added this to the 4.62.0-tentative milestone Dec 10, 2024
@jmwatts
Copy link
Member

jmwatts commented Dec 23, 2024

QA Notes:

  • Maintainer can enable "Install software" automation for team policies
  • Maintainer can enable "Run script" automation for team policies
  • Tooltip to "Select a team to manage calendar events" takes precedent when logged in as an Admin but a team is not selected
  • Tooltip to "Contact a user with an admin role for access" is rendered only for maintainers when the team does not have calendar events enabled for team policies.
  • Maintainer is able to view calendar events modal once calendar events have been enabled for the team by an admin
  • Maintainer can enable specific team policy calendar events for team(s) they have access to, but can not enable calendar events for inherited policies
  • Maintainer is NOT able to toggle "enable/disable calendar events" for a team
  • Maintainer does NOT have access to view "Resolution webhook URL"
  • Maintainer still has access to "Show example payload" dropdown
  • Maintainer still has access to "Preview calendar event" modal (via link at top of Calendar events modal and "⏿ Preview" link for each policy.
  • Admin is able to toggle "enable/disable calendar events" for teams as well as enable specific team policy calendar events
  • Admin has access to view/edit "Resolution webhook URL"

@sharon-fdm sharon-fdm added the #g-orchestration Orchestration product group label Jan 2, 2025
@jmwatts
Copy link
Member

jmwatts commented Jan 2, 2025

@eugkuo and @RachelElysia
QA Wolf noticed something I didn't and I just wanted to make sure it was intended. Before this change Global Maintainers didn't see the "Manage automations" option when "All Teams" was selected, now they see the option but all of the automations are greyed out with a message to choose a team. So I guess functionally the same access but different presentation in the UI. Is this correct or something we need to change?
image
image

@eugkuo
Copy link
Contributor

eugkuo commented Jan 2, 2025

@jmwatts Weird that this would have just "happened." I don't mind keeping the 'Manage automations' UI there when 'All teams' is selected so stuff doesn't appear and disappear off the screen. But if I were to do this, I would grey out the 'Manage automations' entirely with a tooltip to select a team in cases where everything underneath is in the same state.

Is this something that was introduced with this ticket?

@RachelElysia thoughts?

@xpkoala
Copy link
Contributor

xpkoala commented Jan 3, 2025

The last few comments relate to a new issue that has not been created just yet. The original issue has been fixed with the PR attached. Moving this to Ready for Released. I'll attach the new ticket as a comment once it's been created to track the above.

@sharon-fdm sharon-fdm removed the #g-endpoint-ops Endpoint ops product group label Jan 7, 2025
@fleet-release
Copy link
Contributor

Maintainers find peace,
Turning on, off as they please,
Cloud city's pulse eased.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as documented ~frontend Frontend-related issue. #g-orchestration Orchestration product group :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. ~released bug This bug was found in a stable release.
Development

No branches or pull requests

10 participants