Skip to content

Commit

Permalink
Replaced a no_login with no_perm
Browse files Browse the repository at this point in the history
  • Loading branch information
cayb0rg committed Nov 28, 2023
1 parent ae99e85 commit 88c56d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fuel/app/classes/controller/api/instance.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function get_history()
if ( ! $inst_id = Input::get('inst_id')) return $this->response(\Materia\Msg::invalid_input('Requires an inst_id parameter!'), 401);
if ( ! \Materia\Util_Validator::is_valid_hash($inst_id) ) return $this->response(\Materia\Msg::invalid_input($inst_id), 401);
if ( ! ($inst = \Materia\Widget_Instance_Manager::get($inst_id))) return $this->response(new \Materia\Msg('Instance not found', \Materia\Msg::ERROR), 404);
if ( ! \Materia\Perm_Manager::user_has_any_perm_to(\Model_User::find_current_id(), $inst_id, \Materia\Perm::INSTANCE, [\Materia\Perm::FULL])) return $this->response(\Materia\Msg::no_login(), 401);
if ( ! \Materia\Perm_Manager::user_has_any_perm_to(\Model_User::find_current_id(), $inst_id, \Materia\Perm::INSTANCE, [\Materia\Perm::FULL])) return $this->response(\Materia\Msg::no_perm(), 401);

$history = $inst->get_qset_history($inst_id);

Expand Down

0 comments on commit 88c56d9

Please sign in to comment.