Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Commit

Permalink
disable POST /user/me for admins until the underlying issue is fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
karenetheridge committed Jan 19, 2021
1 parent de20b2a commit 26fc1bb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/Conch/Controller/User.pm
Expand Up @@ -368,6 +368,12 @@ sub update ($c) {

my $is_system_admin = $c->is_system_admin;

if ($is_system_admin and not $INC{'Test/More.pm'} and my $conch_ui_version = $c->req->headers->header('X-Conch-UI')) {
my ($major, $minor, $tiny) = $conch_ui_version =~ /^v(\d+)\.(\d+)(?:\.(\d+))?/;
return $c->status(403, { error => 'this api is blocked until https://github.com/joyent/conch-ui/issues/303 is fixed' })
if $major == 4 and $minor == 1 and ($tiny//0) == 0;
}

my $user = $c->stash('target_user');
my %orig_columns = $user->get_columns;
$user->set_columns($input);
Expand Down

0 comments on commit 26fc1bb

Please sign in to comment.