mayadata-io / scope

Monitoring, visualisation & management for Docker & Kubernetes
https://www.weave.works/product/weave-scope/
Apache License 2.0
22 stars 26 forks source link

Allow filtering controls on basis of user kind (#153) #154

Closed satyamz closed 5 years ago

satyamz commented 5 years ago

This commit will categorize the controls into two types:-

  1. Admin Controls (exec, scaleup, scaledown etc.)
  2. Read only Controls (logs, describe, attach)

This will add a new flag i.e disableAdminControls by default, teh value for the above flag will be false, if value is true, all the admin controls will be disabled.

Signed-off-by: Akash Srivastava akashsrivastava4927@gmail.com

This commit will read the header "x-api-user-kind" from request and check if it is "readAdmin" or not. If it is the readAdmin, then it will filter all the adminControls else it will provide all the controls.

Signed-off-by: Akash Srivastava akashsrivastava4927@gmail.com