Airship\Cabin\Bridge\Landing\Ajax::getPermsForUser PHP Method

getPermsForUser() public method

public getPermsForUser ( )
    public function getPermsForUser()
    {
        if (!$this->isSuperUser()) {
            \Airship\json_response(['status' => 'ERROR', 'message' => \__('You are not an administrator.')]);
        }
        if (empty($_POST['username'])) {
            \Airship\json_response(['status' => 'ERROR', 'message' => \__('You must enter a username.')]);
        }
        if (empty($_POST['context'])) {
            \Airship\json_response(['status' => 'ERROR', 'message' => \__('No context provided.')]);
        }
        if (empty($_POST['cabin'])) {
            \Airship\json_response(['status' => 'ERROR', 'message' => \__('No cabin provided.')]);
        }
        $this->getPermissionsDataForUser((int) $_POST['context'], $_POST['username'], $_POST['cabin']);
    }