You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2018-01-12 13:50:31

salazar_luc
Member
Registered: 2018-01-12
Posts: 3

Block\Remove acess to user tab personalization

Hi everyone,

I would like to know if there is a way that can i block\remove the acess of the tab personalizations from my users. I have installed the software in my work and i have done some modificatins on the layout/rules and i don't want to the users alterate some preferences like: "Pre-select me as Technician when Creating Ticket" and stuffs.

Thank you all smile

Version:
    GLPI 9.2.1

Plugins:
    arsurveys        Version: 1.3.0      State: Enabled
    databases        Version: 2.0.0      State: Enabled
    behaviors        Version: 2.0.0      State: Enabled
    formcreator      Version: 2.6.0      State: Enabled
    racks              Version: 1.8.0       State: Enabled
    mailanalyzer      Version: 1.3.6      State: Enabled
    moreticket        Version: 1.3.0      State: Enabled
    dashboard        Version: 0.8.9      State: Enabled

Last edited by salazar_luc (2018-01-22 12:09:13)

Offline

#2 2018-01-23 23:25:01

KKAdmin
Member
From: Germany
Registered: 2010-03-05
Posts: 959

Re: Block\Remove acess to user tab personalization

A self-service user can not use "pre-select me as technician when creating ticket".

To answer your question no i think it is not possible.


You can mark this threat as [resolved] in subject of your threat. (This is only available edit of the first post.) It is good for users who help others to quickly see which post is still open.
##############################################
GLPI 9.3.3

Offline

#3 2018-02-07 21:02:56

salazar_luc
Member
Registered: 2018-01-12
Posts: 3

Re: Block\Remove acess to user tab personalization

Thanks a lot KKAdmin big_smile I'll see if it will work here... but probably i've to edit some php code.

Offline

#4 2018-03-26 19:22:29

salazar_luc
Member
Registered: 2018-01-12
Posts: 3

Re: Block\Remove acess to user tab personalization

Here it's the solution for my problem...

Stating on line 72 from preferences.php, edit:

$pref = new Preference();
$pref->display(['main_class' => 'tab_cadre_fixe']);

to

if(Session::getLoginUserID() == 13){
        $pref = new Preference();
        $pref->display(['main_class' => 'tab_cadre_fixe']);
   }else{
        echo '<div class="center">';
        echo '<br>';
        echo '<br>';
        echo '<img src="/glpi/pics/warning.png" alt="Warning" title="Warning">';
        echo '<br>';
        echo '<br>';
        echo '<span class="b">You don't have permission to do that</span>';
        echo '</div>';
   }

Offline

#5 2018-04-04 16:48:03

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,273

Re: Block\Remove acess to user tab personalization

It's dangerous to display some code based on a user number, because this number is an auto-increment and can change in the database.
It's better to filter on a profile


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

Board footer

Powered by FluxBB