PiBa-NL / pfsense-haproxy-package-doc

54 stars 15 forks source link

Widget: Allow for 'Read-Only' functionality #2

Closed linux-colonel closed 8 years ago

linux-colonel commented 8 years ago

I want users to be able to view the dashboard but not be able to make any changes to the system. I am using the haproxy widget, but read-only users can click the 'stop' button to disable the backends (outlined in red in the screenshot).

haproxy-widget

Details: HAProxy version: 0.48 (pfSense package) (haproxy version 1.6.4) pfSense version: 2.3.1-RELEASE-p5

The 'read-only' users are in a single group with the following permissions: User - Config: Deny Config Write WebCfg - Dashboard (all)

Would it be possible to hide / disable the stop buttons unless the user has this permission: WebCfg - Services: HAProxy package

Please let me know if there is a more appropriate place to submit this issue. Thanks for all your work on the haproxy pfSense package - it's awesome!

PiBa-NL commented 8 years ago

I'm not really sure what is the right place either.. I suppose Redmine.. But i only check there once a month or so.. Anyway here works for me :)..

Anyway your request seems like a good improvement, i have currently made some changes locally and seems to be working, needs a little more testing though, and i have a few more pending commits i need to finish up.. Might take me week or so.. Thanks for your feature/improvement request.

linux-colonel commented 8 years ago

Cool - I'd be happy to test it out when it's ready. Thanks!

PiBa-NL commented 8 years ago

I made some changes to haproxy-devel 0.49 , that should only allow users that have full or haproxy permissions to stop/start backends on the widget. Hope that solves your request :) https://github.com/pfsense/FreeBSD-ports/pull/165/commits/1c1910a48618622296d8b68dd8bbbfcf607569db if you could give it a testrun maybe together with the other changes in that pullrequest, before its committed by the pfSense team that would be nice. Though i'm not actually sure when that will be ;) no worries if they are faster.

linux-colonel commented 8 years ago

Cool it works :-) Looks like the pfSense team was faster than me. Thanks for implementing this.