Project Admin vs. Global Admin Navigation Fix

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
Kaffeetrinker
Posts: 1
Joined: 16 Mar 2007, 23:19
Location: Germany
Contact:

Project Admin vs. Global Admin Navigation Fix

Post by Kaffeetrinker »

Hi there

here is a small fix for the current CVS Version (HEAD):

File: core/html_api.php
Search at Line 541:

Code: Select all

if ( access_has_project_level( ADMINISTRATOR, $t_current_project ) ) {
Replace with:

Code: Select all

if ( access_has_global_level( ADMINISTRATOR ) ) {
Problem was:
A user with Administration Role (in a Project) could not use the navigation link "Manage" because this caused an Access Restricted Error. The source checked on project level instead of global level for the if case.

Now it's checked if you are an global administrator or not. When not, you get an alternate link for "Manage" which leads to the project administration instead of the user administration.

So long and sorry for typos/misspellings, i've to much blood in my caffein veins :)
i programmed three days
and heard no human voices.
but the hard disk sang

-- Geoffrey James, "The Zen of programming"
vboctor
Site Admin
Posts: 1304
Joined: 13 Feb 2005, 22:11
Location: Redmond, Washington
Contact:

Post by vboctor »

Please report this in the bug tracker. I suggest using the following check:

Code: Select all

if ( current_user_is_administrator() ) {
Migrate your MantisBT to the MantisHub Cloud
Post Reply