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

[Production ssh access]: Carley off-boarding #3739

Closed
tadhg-ohiggins opened this issue Apr 22, 2024 · 0 comments
Closed

[Production ssh access]: Carley off-boarding #3739

tadhg-ohiggins opened this issue Apr 22, 2024 · 0 comments
Assignees
Labels

Comments

@tadhg-ohiggins
Copy link
Contributor

Start (UTC)

2024-04-22 23:46 UTC

End (UTC)

2024-04-22 23:48 UTC

Explanation

Done to remove Carley's Django Admin privileges as per #3673

Command log

cf login -a api.fr.cloud.gov -o gsa-tts-oros-fac -s production --sso
cf allow-space-ssh production
echo $(date -u +"%Y-%m-%d %H:%M") UTC
#2024-04-22 23:46 UTC
cf ssh gsa-fac
/tmp/lifecycle/shell
python manage.py shell
targets = ("<redacted>",)
from django.contrib.auth import get_user_model
users = get_user_model().objects.filter(email__in=targets)
user=users[0]
print(user.is_staff)
#True
print(user.is_superuser)
#True
def delprivs(user):
    user.is_staff = False
    user.is_superuser = False
    user.save()

delprivs(user)

print(user.is_staff)
#False
print(user.is_superuser)
#False
exit()
exit
exit
cf disallow-space-ssh production
echo $(date -u +"%Y-%m-%d %H:%M") UTC
#2024-04-22 23:48 UTC
@tadhg-ohiggins tadhg-ohiggins self-assigned this Apr 22, 2024
@github-project-automation github-project-automation bot moved this to Triage in FAC Apr 22, 2024
@tadhg-ohiggins tadhg-ohiggins moved this from Triage to Done in FAC Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

1 participant