Skip to content

Commit

Permalink
fix: avoid crash in display_orgs_table when org.created_t is not set,…
Browse files Browse the repository at this point in the history
… fix permission (#11203)

fixes #11200

---------

Co-authored-by: root <[email protected]>
Co-authored-by: OFF <[email protected]>
  • Loading branch information
3 people authored Jan 7, 2025
1 parent 5ae1273 commit 765d796
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cgi/display_org_table.pl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
display_error_and_exit($request_ref, $Lang{error_no_permission}{$lc}, 401);
}

if ((not $request_ref->{admin}) or (not $User{pro_moderator})) {
if ((not $request_ref->{admin}) and (not $User{pro_moderator})) {
$log->debug("user does not have permission to view organisation list", {User_id => $User_id}) if $log->is_debug();
display_error_and_exit($request_ref, $Lang{error_no_permission}{$lc}, 403);
}
Expand Down
2 changes: 1 addition & 1 deletion templates/web/pages/dashboard/display_orgs_table.tt.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
</a>
</td>
<td>[% org.valid_org %]</td>
<td>[% display_date_ymd(org.created_t) %]</td>
<td>[% IF org.created_t %][% display_date_ymd(org.created_t) %][% END %]</td>
<td>
[% IF org.last_logged_member_t %]
[% display_date_ymd(org.last_logged_member_t) %]
Expand Down

0 comments on commit 765d796

Please sign in to comment.