I would like to offer some server on a public status page. Ist there a comfortable way?
One way could be to create a user "public" and to create a url inclusive autologin. But it need to be a readonly user (incl. passwort changes).
Do you know another / better way?
thanks
Joerg
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'd also love to do this, i'm using screenly to display information within our office, it doens't support password entry directly into the web interface, so i'd like to be able to create a public read only interface, if that means providing a URL based login thats fine. If theres anyone who can advise how to action this i'd be very appreciative.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Create a Public user, give access to servers you want
Memorize the ID it gives to you
\src\psm\Service\User.php
Line 98 (after $this->session = $session;)
global $_GET;
if ($_GET["kl"] == "public"){
$user_id = 2;
$this->setUserLoggedIn($user_id, true);
$user = $this->getUser($user_id);
$this->newRememberMeCookie();
}
When you will tap the URL http:/server/servermonitor/?kl=public it will take the Public account
This method use a particular userid so even if somebody change the password, the script will never use it anyway.
I changed something else to cut some menu items
\psm\Module\AbstractController.php
Line 271 : erase the server_update function, I think this is only the crontab need to make a status update and I seen some troubles when I make it manually.
Line 274 : comment the entire items line, when you are only User (Public account) you don't want to have other things to see other then the servers status page
Thank you for this! Is there a way to remove the "Welcome, %username%" and the dropdown menu that goes along with it and have this unique to the public user id? I don't think it's necessary for the public to logout or view profile of the public profile account.
Last edit: Tyler 2018-12-27
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Works for me :) thank you!
Would be great if there would be a public option in the next release. for now i have to find out hot to hide the header for this specific user. I dont want them to see the menu at all. So they can not ad a phonenumber or change the e-mail for this "public" user.
Last edit: Patrick Hofmann 2017-07-08
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's better just to remove the items you don't want exposed to the public profile instead of commenting out the entire line, for example, if you want the public page to have access to everything BUT the server config page, you would just remove the term "server" so the line would look like this:
Hi,
I would like to offer some server on a public status page. Ist there a comfortable way?
One way could be to create a user "public" and to create a url inclusive autologin. But it need to be a readonly user (incl. passwort changes).
Do you know another / better way?
thanks
Joerg
I'd also love to do this, i'm using screenly to display information within our office, it doens't support password entry directly into the web interface, so i'd like to be able to create a public read only interface, if that means providing a URL based login thats fine. If theres anyone who can advise how to action this i'd be very appreciative.
Have anyone of you guy foudn a solution yet?
Yes there is my modifications :
\src\psm\Service\User.php
Line 98 (after $this->session = $session;)
When you will tap the URL http:/server/servermonitor/?kl=public it will take the Public account
This method use a particular userid so even if somebody change the password, the script will never use it anyway.
I changed something else to cut some menu items
\psm\Module\AbstractController.php
Line 271 : erase the server_update function, I think this is only the crontab need to make a status update and I seen some troubles when I make it manually.
$items = array('server_status', 'server', 'server_log', 'user', 'config');
Line 274 : comment the entire items line, when you are only User (Public account) you don't want to have other things to see other then the servers status page
//$items = array('server_status', 'server', 'server_log', 'server_update');
Last edit: Tommy Grignon 2017-05-25
Thank you for this! Is there a way to remove the "Welcome, %username%" and the dropdown menu that goes along with it and have this unique to the public user id? I don't think it's necessary for the public to logout or view profile of the public profile account.
Last edit: Tyler 2018-12-27
Works for me :) thank you!
Would be great if there would be a public option in the next release. for now i have to find out hot to hide the header for this specific user. I dont want them to see the menu at all. So they can not ad a phonenumber or change the e-mail for this "public" user.
Last edit: Patrick Hofmann 2017-07-08
FYI on the line 274:
It's better just to remove the items you don't want exposed to the public profile instead of commenting out the entire line, for example, if you want the public page to have access to everything BUT the server config page, you would just remove the term "server" so the line would look like this:
$items = array('server_status', 'server_log', 'server_update');
Is there a way to fix the info line:
Notice: Undefined index: kl in: \src\psm\Service\User.php on Line 100
Try This code to get rid of the Notice: Undefined index: kl in: \src\psm\Service\User.php on Line 100
$kl = "";
$kl = isset($_GET["kl"]) ? $_GET["kl"] : '';
if ($kl == "public"){
$user_id = 3;
$this->setUserLoggedIn($user_id, true);
$user = $this->getUser($user_id);
$this->newRememberMeCookie();
}
PLease can some one provide more details on how this can be done.
i want the php server mon to skip the log in page and go straight to the server. is this possible?
any news? has already built in maybe in new release?
Hi
if ($_GET["kl"] == "public"){
$user_id = 2;
$this->setUserLoggedIn($user_id, true);
$user = $this->getUser($user_id);
$this->newRememberMeCookie();
}
This code works but I would like an user_id can work more than id=2 like I want to let it work from id 2 to id 50 how to do that