This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Timeout for Sentora Admin Panel
#1
Timeout for Sentora Admin Panel
Hi,

Is there any way I can set timeout for Sentora Admin Panel ? Now, its like once login and you will be in till the browser cache is cleared.

Thanks in advance
Reply
Thanks given by:
#2
RE: Timeout for Sentora Admin Panel
(11-11-2015, 03:13 AM)minufreelance Wrote: Hi,

Is there any way I can set timeout for Sentora Admin Panel ? Now, its like once login and you will be in till the browser cache is cleared.

Thanks in advance



Whether anyone has come across such a setting as it is important concerning the server security ?
Reply
Thanks given by:
#3
RE: Timeout for Sentora Admin Panel
One should always log out of any site/forums/etc. that they have logged into.
I think way back when somebody had made something like this, but it was a long time ago and I am sure it's lost... I'll take a look around and see what I can find.
-TGates - Head of Support

SEARCH the Forums or read the DOCUMENTATION before posting!
Modules Maintained: 13 - Module Installs: 108k+

Find my support helpful? Donate HERE
Help me to help you by getting your domains using this link:
GoDaddy - Domains
Reply
Thanks given by:
#4
RE: Timeout for Sentora Admin Panel
(11-11-2015, 03:05 PM)TGates Wrote: One should always log out of any site/forums/etc. that they have logged into.
I think way back when somebody had made something like this, but it was a long time ago and I am sure it's lost... I'll take a look around and see what I can find.

Thanks a lot TGates. There are chances that someone may forget to logout or probably close the window without logging out.. In all the usual control panel nowadays has this session timeout feature and its mandatory I guess concerning security aspect.

Awaiting your reply :-)
Reply
Thanks given by:
#5
RE: Timeout for Sentora Admin Panel
I found a small code that you add to the template. Installed it on my server and works perfect. Will have to look into incorporating it into the core.

OPEN:
/etc/sentora/etc/styles/Sentora_Default/master.ztml

FIND: (near the bottom)

Code:
       <!-- Modulelist for Typeahead -->
       <script>
               var moduleJsonData = <# ui_tpl_modulelistjson #>;
               Sentora.modules.typeAhead(moduleJsonData);
       </script>


AFTER ADD:
Code:
        <!-- auto-logout JS -->
        <script type="text/javascript">
        $(document).ready(function(){
        setInterval(function(){
                $.get("<# ui_tpl_assetfolderpath #>check.php", function(data){
                if(data==0) window.location.href="?logout";
                });
            },1*60*1000);
        });
        </script>
SAVE/UPLOAD

CREATE FILE:
/etc/sentora/etc/styles/Sentora_Default/check.php

INSERT INTO 'check.php':
PHP Code:
<?php
$timeOut 
"120"// (120 seconds = 2 minutes)

if(isset($_SESSION['timeout']) ) {
    
$session_life time() - $_SESSION['timeout'];
    if(
$session_life $timeOut) echo "0";
        else echo 
"1";
}
$_SESSION['timeout'] = time();
?>
SAVE/UPLOAD
-TGates - Head of Support

SEARCH the Forums or read the DOCUMENTATION before posting!
Modules Maintained: 13 - Module Installs: 108k+

Find my support helpful? Donate HERE
Help me to help you by getting your domains using this link:
GoDaddy - Domains
Reply
Thanks given by: minufreelance , Ron-e , kmlreverser
#6
RE: Timeout for Sentora Admin Panel
(11-11-2015, 05:56 PM)TGates Wrote: I found a small code that you add to the template. Installed it on my server and works perfect. Will have to look into incorporating it into the core.

OPEN:
/etc/sentora/etc/styles/Sentora_Default/master.ztml

FIND: (near the bottom)

Code:
       <!-- Modulelist for Typeahead -->
       <script>
               var moduleJsonData = <# ui_tpl_modulelistjson #>;
               Sentora.modules.typeAhead(moduleJsonData);
       </script>


AFTER ADD:
Code:
        <!-- auto-logout JS -->
        <script type="text/javascript">
        $(document).ready(function(){
        setInterval(function(){
                $.get("<# ui_tpl_assetfolderpath #>check.php", function(data){
                if(data==0) window.location.href="?logout";
                });
            },1*60*1000);
        });
        </script>
SAVE/UPLOAD

CREATE FILE:
/etc/sentora/etc/styles/Sentora_Default/check.php

INSERT INTO 'check.php':
PHP Code:
<?php
$timeOut 
"120"// (120 seconds = 2 minutes)

if(isset($_SESSION['timeout']) ) {
    
$session_life time() - $_SESSION['timeout'];
    if(
$session_life $timeOut) echo "0";
        else echo 
"1";
}
$_SESSION['timeout'] = time();
?>
SAVE/UPLOAD


That was quick and awesome... It really worked very well as expected..

Thanks a lot TGates :-)

It will be great if you could pls include the same in the next patch which will be very much useful.
Reply
Thanks given by:


Possibly Related Threads...
Thread Author Replies Views Last Post
Change Panel Sub-domain TGates 5 10,227 04-01-2017, 02:08 AM
Last Post: TGates
How to Create Sentora Panel Subdomain for the installation? channelriyas 13 645 03-24-2017, 07:30 PM
Last Post: channelriyas
New Style for Sentora Part 3 (Новый стиль для Sentora Часть 3) MarkDark 0 233 03-14-2017, 12:11 AM
Last Post: MarkDark

Forum Jump:


Users browsing this thread: 1 Guest(s)