Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Custom plugin that disabled access to the admin panel

  • alorenc
  • alorenc's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 3 months ago #213697 by alorenc
I have the application on two servers, the first on the DMZ, the second on the LAN. They both use the same database, file synchronization etc. In DMZ I have to remove the admin panel. The removal is too invasive, making future updates difficult.

I wrote a plugin that executes for the beforeControllerAction event and throws a CHttpException (404, "...") when the condition is true: "admin" == $this->event->get("controller") (additionally checks if this is the DMZ).

Will it be a complete solution to deny panel access?
The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
4 years 3 months ago #213722 by DenisChenu
In 3. X near ,
In 4.X : there are more controller and some are not inside admin controller : github.com/LimeSurvey/LimeSurvey/tree/ma...lication/controllers .

BUT : in my opinion : disabling Authentication only must be OK.

Else : maybe you can enable clearly public controller (and plugins if you need direct event)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
  • alorenc
  • alorenc's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 3 months ago #213841 by alorenc
How to disable only authentication via a plugin?

Can this be done from a config file (no plugin)?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
4 years 3 months ago - 4 years 3 months ago #213856 by DenisChenu

How to disable only authentication via a plugin?

Send a 401 with controller is admin and subaction is authentication : you do more when testing controller is admin : then : it's OK, no need more (in my opinion)
OR : use an authentication event : www.limesurvey.org/manual/Authentication...lopment#newLoginForm

Can this be done from a config file (no plugin)? 
No …
But in your plugin you can check config (App()->getConfig("isOut") )

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
Last edit: 4 years 3 months ago by DenisChenu.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose