Datacenter build and management service
Conch::Plugin::AuthHelpers
Contains all convenience handlers for authentication
return $c->status(403) if not $c->is_system_admin;
Verifies that the currently stashed user has the ‘is_admin’ flag set
return $c->status(403) if not $c->is_workspace_admin;
Verifies that the currently stashed user_id has ‘admin’ permission on the current workspace (as specified by :workspace_id in the path) or one of its ancestors.
Verifies that the currently stashed user_id has (at least) this auth role on the specified workspace (as indicated by :workspace_id in the path).
Users with the admin flag set will always return true, even if no user_workspace_role records are present.
Copyright Joyent, Inc.
This Source Code Form is subject to the terms of the Mozilla Public License, v.2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.