dolibarr-bugtrack
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dolibarr-bugtrack] [Bug #394] Administrator script with connections blo


From: Doliforge
Subject: [Dolibarr-bugtrack] [Bug #394] Administrator script with connections blocked
Date: Tue, 19 Mar 2013 09:50:25 +0100

Doliforge
Is this email not displaying correctly?
update email preferences.

Administrator script with connections blocked

Latest modifications

2013-03-19 09:50 (Europe/Paris)
Changes:
  • Status: 
OpenClosed

Answer now

Snapshot

 Details
Submitted by:  Raphaël Doursenaud (rdoursenaud) Submitted on:  2012-05-07 10:17
Last Modified On:  2013-03-12 16:58 Dolibarr version:  3.2.0
PHP version:  5.3.12 Database type and version:  5.5.23
OS Type/Version:  Linux 3.3.4 Category:  Core problem
Severity:  5 - Major 
Summary:  Administrator script with connections blocked
Description:  Trying to execute a script as administrator with new connections locked (maintenance mode) is refused.
I expected to still be able to execute it as administrator.
Step to reproduce bug:  Is it a script into /script directory.
 Status
Resolution:  Fixed Assigned to:  Laurent Destailleur (eldy)
Status:  Closed 

Comments

Laurent Destailleur 2013-03-12 16:58
So i think define('EVEN_IF_ONLY_LOGIN_ALLOWED',1) answer your problem.
I updated skeleton template script to show it. So i close the request.
Raphaël Doursenaud 2013-03-12 15:58
My script is a data update script that is run as the super-administrator user.
I need to block connections before running it to avoid errors based on user activity.

As the web user interface of Dolibarr allows any operation to be made by the administrator in login locked mode, I expected it to be the same for my script.

I didn't know about the EVEN_IF_ONLY_LOGIN_ALLOWED though. Looks like a good hint for my script.
Oh, and thanks !
Laurent Destailleur 2013-03-09 15:18
Most scripts into directory /script are use with no user (so anonymous). So they are blocked.

We can add the line:
define('EVEN_IF_ONLY_LOGIN_ALLOWED',1) at begin of script to make the script working despite the lock. But i am not sure that's what we want, since option lock login is done to avoid any activity onto database (for database maintenance purpose for example).
Do you see a script that should be allowed to work when we are in maintenance mode ?
Raphaël Doursenaud 2012-05-10 11:59
Yes it is a custom script in /script directory built using the supplied skeleton.
Didn't try a supplied script though.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]