Hide link to syslog for device if syslog is not enabled. #1191

Merged
merged 1 commit into from Jun 4, 2015

Projects

None yet

4 participants

@SaaldjorMike
Member

No description provided.

@paulgear
Member
paulgear commented Jun 3, 2015

I don't think we want to redirect to / in the case of html/pages/device/logs/syslog.inc.php - that would redirect someone to the overview page for just clicking on the wrong tab in the device menu. I think we'd be better just to wrap the remainder of the code in that file in the test for enabling it.

@SaaldjorMike
Member

@paulgear: Not sure I'm getting what you're saying. The link to syslog for a given device will not be shown since the changes to html/pages/device/logs.inc.php will remove the link shown for syslog, thus making it impossible for some user to press the link.

The menu for /device/device=ID/tab=logs/ with enable_syslog=0:
Before: https://i.imgur.com/rmL1VLH.png
After: https://i.imgur.com/eqGaPSA.png

With enable_syslog=1, it will appear exactly like the 'after' screendump from above.

@Rosiak
Contributor
Rosiak commented Jun 3, 2015

Seems like a great idea.

@paulgear
Member
paulgear commented Jun 3, 2015

@SaaldjorMike True, the link won't be there, but any bookmarks would break and be redirected to somewhere surprising. Not a big deal either way, though...

@SaaldjorMike
Member

@paulgear: True, but since syslog is not really enabled I just assumed that one should not be able to go to the pages. Let me know if you want me to change anything.

@laf
Member
laf commented Jun 3, 2015

Can see why the redirects are in place but personally I'd remove them as you can actually run syslog without it being enabled in the menu system. So hide the link but don't redirect the user. You might also have had syslog running but now it's disabled yet you still want to see legacy data.

@laf laf added the WebUI label Jun 3, 2015
@SaaldjorMike
Member

@paulgear @laf: I've now only included the commit that hides the link in the branch.

@SaaldjorMike SaaldjorMike changed the title from Deny access to syslog pages if syslog is not enabled. to Hide link to syslog for device if syslog is not enabled. Jun 4, 2015
@laf laf merged commit b71ae21 into librenms:master Jun 4, 2015

1 check passed

Scrutinizer No new issues
Details
@SaaldjorMike SaaldjorMike deleted the SaaldjorMike:syslog-perms branch Jan 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment