MHMDhub / enterprise-log-search-and-archive

Automatically exported from code.google.com/p/enterprise-log-search-and-archive
0 stars 0 forks source link

Broken Permission on auth "local" #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. set auth "method" : "local" in elsa_web.conf;
2. every user "is admin", because array "admin_groups" : [ "system", "admin" ] 
is not matched;
3. set permission to user for one class_id is not working, the user have all 
classes in "Add Term" and  "Report On" dropdown.  

What is the expected output? What do you see instead?
The user that is not admin, don't have the "Admin" tab.
The user that have some permission/restriction, have only some classes in "Add 
Term" and "Report On" dropdown   

What version of the product are you using? On what operating system?
last elsa r161,
debian 6.0

Please provide any additional information below.
In the older version of elsa (the one with Janus) all works fine.

Original issue reported on code.google.com by daniele....@gmail.com on 17 Jan 2012 at 5:03

GoogleCodeExporter commented 8 years ago
Patch for the first problem: if auth method is local, the array "admin_groups" 
in elsa_web.conf is not matched. 

elsa/web/lib/API.pm at line 397 added "eq $_" .

diff elsa/web/lib/API.pm elsa/web/lib/API.pm.orig 

397c397
<                         if ( grep { $user_info->{username} eq $_ } 
@admin_groups ){
---
>                         if ( grep { $user_info->{username} } @admin_groups ){

Original comment by daniele....@gmail.com on 20 Jan 2012 at 12:44

GoogleCodeExporter commented 8 years ago
This is fixed in the latest commit.  Thanks for the report!  Word of caution: 
local auth is not working at the moment on RedHat/CentOS due to some weird 
SELinux issues.  I'm hoping that gets fixed in the near future.

Original comment by mchol...@gmail.com on 3 Feb 2012 at 2:37