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

Change org Delete button to Deactivate in admin client #3728

Closed
3 tasks
svenaas opened this issue Dec 13, 2021 · 13 comments
Closed
3 tasks

Change org Delete button to Deactivate in admin client #3728

svenaas opened this issue Dec 13, 2021 · 13 comments
Assignees

Comments

@svenaas
Copy link
Contributor

svenaas commented Dec 13, 2021

User Story

As an admin using the admin client I need to be able to deactivate organizations.

Background (Optional)

The Orgs index page currently presents a Delete button in the Actions column. This button currently does nothing. It should be changed to read "Deactivate" and trigger that functionality.

Acceptance Criteria

  • The deactivate button is presented instead of the delete button
  • Pressing the deactivate button results in the deactivation of an org.

After evaluating, edit this part:

Level of effort - <low/medium/high>

Implementation outline (if higher than "low" effort):

@svenaas svenaas changed the title Remove Delete button from sites index in admin client Remove Delete button from orgs index in admin client Dec 14, 2021
@svenaas svenaas changed the title Remove Delete button from orgs index in admin client Deal with Delete button from orgs index in admin client Dec 14, 2021
@svenaas svenaas changed the title Deal with Delete button from orgs index in admin client Change org Delete button to Deactivate in admin client Dec 14, 2021
@svenaas svenaas self-assigned this Feb 1, 2022
@svenaas
Copy link
Contributor Author

svenaas commented Feb 1, 2022

Deactivation functionality is not yet implemented for organizations. I can implement this, but @davemcorwin, what business rules should determine whether an organization can or cannot be deactivated? Can organizations be deactivated if they have associated sites? If they have associated users? Does it depend on the status of those sites or users?

@svenaas
Copy link
Contributor Author

svenaas commented Feb 1, 2022

Should we add the deactivation event to the audit log?

@svenaas
Copy link
Contributor Author

svenaas commented Feb 1, 2022

Is org deactivation a serious enough action that we should require admin confirmation before carrying out the action, as we do for domain deprovisioning and deletion?

@davemcorwin
Copy link
Contributor

davemcorwin commented Feb 1, 2022

Deactivation functionality is not yet implemented for organizations. I can implement this, but @davemcorwin, what business rules should determine whether an organization can or cannot be deactivated? Can organizations be deactivated if they have associated sites? If they have associated users? Does it depend on the status of those sites or users?

The use case here is if an IAA expires, we want to essentially freeze the organization. I believe we already have this in place on a per site basis, so deactivating an organization should have the same effect for all of the sites within an organization as well as preventing access to that organization for its users.

Should we add the deactivation event to the audit log?

Probably.

Is org deactivation a serious enough action that we should require admin confirmation before carrying out the action, as we do for domain deprovisioning and deletion?

Probably.

@svenaas
Copy link
Contributor Author

svenaas commented Feb 1, 2022

OK. Organization has an isActive property; at the moment my provisional deactivate implementation simply sets that to false. I haven't looked yet to see what, if anything, depends on isActive. It's possible that more things should than do, if we need this to have the effect of preventing users from accessing an org or its sites and that business logic hasn't already been implemented.

I was imagining I'd have to add a canDeactivate method (which I have, though for the moment it just returns true since I wasn't sure of the rules). I was trying to figure out the best way to inject canDeactivate properties into each row in the results of the admin org controller's list, since the "Deactivate" button appears in a column of the admin org index page. But maybe there's no need for canDeactivate gatekeeping if it doesn't depend on the state of things, and we're just going to act on the admin's judgement once they choose to click on the button and confirm that they mean it?

@davemcorwin
Copy link
Contributor

I don't think there needs to be any additional gatekeeping. The only possible thing I can think of is if we didn't want to deactivate sandbox orgs, but that's pretty meh either way.

@svenaas
Copy link
Contributor Author

svenaas commented Feb 2, 2022

(Implemented but not yet merged.)

@svenaas
Copy link
Contributor Author

svenaas commented Feb 11, 2022

Merged, but I don't think staging is quite there yet to confirm it.

@svenaas
Copy link
Contributor Author

svenaas commented Feb 14, 2022

I would like to confirm this on staging but there are currently no organizations on staging to deactivate, and I find I can't create one: #3779 I was trying on Federalist staging instead of Pages staging and I'm going to have to wait for Pages staging to be recreated.

@svenaas
Copy link
Contributor Author

svenaas commented Feb 17, 2022

This is merged and deployed to production, but since it's a Pages thing I'd kind of like to confirm it in Pages staging before we move it done.

@davemcorwin
Copy link
Contributor

@svenaas This should now be QA-able

@svenaas
Copy link
Contributor Author

svenaas commented Feb 24, 2022

@davemcorwin I thought so too but apparently not. Slack'd.

@svenaas
Copy link
Contributor Author

svenaas commented Mar 11, 2022

#3779 is still a big but it turns out not to be a blocker. This is good news, and it has enabled me to confirm that I can deactivate (and reactivate) orgs on Pages staging! 🎉

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

No branches or pull requests

2 participants