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 2012-10-08 07:22:10

mhouston100
Member
Registered: 2011-12-12
Posts: 63

FormCreator-only security

Hey guys,

Hopefully an easy one.  We are looking to integrate FormCreator into our existing GLPI install and it is working fine,  however some of the users that will require the forms don't have any access to GLPI.

We can create accounts for them,  thats no problem,  but is there any way we can give them ONLY access to the plugins menu that is added with FormCreator?  The most basic user I have been able to create still has access to read the knowledge base etc

Thanks in advance!

Offline

#2 2012-10-08 07:29:08

mhouston100
Member
Registered: 2011-12-12
Posts: 63

Re: FormCreator-only security

Sorry,  got it,  just removed all other access and that seems to do it.

It is pretty ugly at the moment though,  it just shows 'Home' and 'Plugins' in the top menu.

Is it difficult to adjust this?  I would like it to just have 'Forms at the top,  or even default directly to the forms page for certain users?

Offline

#3 2012-11-05 16:28:00

meuced
Member
From: CH du Val d'Ariège
Registered: 2007-01-23
Posts: 157

Re: FormCreator-only security

Hello,

i'm looking for the same thing : anonymous access to a specific form, or redirect directly to a specific form when certain users log-in.

Did you find a solution ?

Offline

#4 2012-12-18 02:36:12

mhouston100
Member
Registered: 2011-12-12
Posts: 63

Re: FormCreator-only security

No solution so far... we havent implemented it yet but a 'form only' user will log in,  see a blank home screen and then have to select the 'Plugins --> Form Creator' menu.

Still not pretty but doable...

Offline

#5 2012-12-18 11:35:21

nicotontige
Member
Registered: 2011-06-15
Posts: 137

Re: FormCreator-only security

Hello,

Sorry for the late reply, but I also have an anonymous version for formcreator.
Simple changes are possible to put this in place (which is not recommended).

I put this system for the same as the FAQ. SO you must put it available in the general setup.
After this is the different line of code :
#### glpi/front/helpdesk.faq.php => in order to have the link at the top
replace this :

if (Session::getLoginUserID()) {
   Html::helpHeader($LANG['Menu'][20],$_SERVER['PHP_SELF'],$_SESSION["glpiname"]);
} else {
   $_SESSION["glpilanguage"] = $CFG_GLPI['language'];
   // Anonymous FAQ
   Html::simpleHeader($LANG['Menu'][20],array($LANG['login'][10] => $CFG_GLPI["root_doc"],
                                              $LANG['Menu'][20]  => $_SERVER['PHP_SELF']));
}

by this :

if (Session::getLoginUserID()) {
   Html::helpHeader($LANG['Menu'][20],$_SERVER['PHP_SELF'],$_SESSION["glpiname"]);
} else {
   $_SESSION["glpilanguage"] = $CFG_GLPI['language'];
   // Anonymous FAQ
   Html::simpleHeader($LANG['Menu'][20],array($LANG['login'][10] => $CFG_GLPI["root_doc"],
                                              $LANG['Menu'][20]  => $_SERVER['PHP_SELF'],
                                              $LANG['plugin_formcreator']['name'] => "../plugins/formcreator/front/formlist.php"));
}

#####glpi/inc/html.class.php
~~~~~~ modification of the function simpleHeader ~~~~~~
replace :

static function simpleHeader($title, $links=array()) {
      global $CFG_GLPI, $LANG, $HEADER_LOADED;

      // Print a nice HTML-head for help page
      if ($HEADER_LOADED) {
         return;
      }
      $HEADER_LOADED = true;

      self::includeHeader($title);

      // Body
      echo "<body>";

      // Main Headline

by

static function simpleHeader($title, $links=array(), $onload="") {
      global $CFG_GLPI, $LANG, $HEADER_LOADED;

      // Print a nice HTML-head for help page
      if ($HEADER_LOADED) {
         return;
      }
      $HEADER_LOADED = true;

      self::includeHeader($title);

      // Body
      echo "<body";
      if (!empty($onload)) {
          echo " onload='$onload'";
      }
      echo ">";

      // Main Headline

Hopefully we don't have to modify the plugin, i already put it in place for the lastest version.


If there is some problems, don't hesitate to contact me smile

Offline

Board footer

Powered by FluxBB