[graylog2] Re: Change permission for user

2015-12-01 Thread Anant Sawant
HI!!
Try replacing this peace of code 

this.state.permissions.
SOURCES_READ?t.createElement(l,{title:this._systemTitle(),active:this._isActive("/system")},this.state.permissions.SOURCES_READ&(u,{href:jsRoutes.controllers.SystemController.index(0).url},"Overview"),this.state.permissions.SOURCES_READ&(u,{href:jsRoutes.controllers.NodesController.nodes().url},"Nodes"),this.state.permissions.SOURCES_READ&_isPermitted(["INPUTS_READ"])&(u,{href:jsRoutes.controllers.InputsController.index().url},"Inputs"),this._isPermitted(["OUTPUTS_READ"])&(u,{href:jsRoutes.controllers.OutputsController.index().url},"Outputs"),this._isPermitted(["COLLECTORS_READ"])&(u,{href:jsRoutes.controllers.CollectorsController.index().url},"Collectors"),this._isPermitted(["INDICES_READ"])&(u,{href:jsRoutes.controllers.IndicesController.index().url},"Indices"),this._isPermitted(["LOGGERS_READ"])&(u,{href:jsRoutes.controllers.LoggingController.index().url},"Logging"),this._isPermitted(["USERS_EDIT"])&(u,{href:jsRoutes.controllers.UsersController.index().url},"Users"),this._isPermitted(["DASHBOARDS_CREATE","INPUTS_CREATE","STREAMS_CREATE"])&(u,{href:jsRoutes.controllers.BundlesController.index().url},"Content
 
Packs"),this._isPermitted(["INPUTS_EDIT"])&(u,{href:jsRoutes.controllers.GrokPatternsController.index().url},"Grok
 
Patterns")):null)

with


this._isPermitted(["SEARCHES_ABSOLUTE","SEARCHES_RELATIVE","SEARCHES_KEYWORD"])&_READ?t.createElement(l,{title:this._systemTitle(),active:this._isActive("/system")},this.state.permissions.SOURCES_READ&(u,{href:jsRoutes.controllers.SystemController.index(0).url},"Overview"),this.state.permissions.SOURCES_READ&(u,{href:jsRoutes.controllers.NodesController.nodes().url},"Nodes"),this.state.permissions.SOURCES_READ&_isPermitted(["INPUTS_READ"])&(u,{href:jsRoutes.controllers.InputsController.index().url},"Inputs"),this._isPermitted(["OUTPUTS_READ"])&(u,{href:jsRoutes.controllers.OutputsController.index().url},"Outputs"),this._isPermitted(["COLLECTORS_READ"])&(u,{href:jsRoutes.controllers.CollectorsController.index().url},"Collectors"),this._isPermitted(["INDICES_READ"])&(u,{href:jsRoutes.controllers.IndicesController.index().url},"Indices"),this._isPermitted(["LOGGERS_READ"])&(u,{href:jsRoutes.controllers.LoggingController.index().url},"Logging"),this._isPermitted(["USERS_EDIT"])&(u,{href:jsRoutes.controllers.UsersController.index().url},"Users"),this._isPermitted(["DASHBOARDS_CREATE","INPUTS_CREATE","STREAMS_CREATE"])&(u,{href:jsRoutes.controllers.BundlesController.index().url},"Content
 
Packs"),this._isPermitted(["INPUTS_EDIT"])&(u,{href:jsRoutes.controllers.GrokPatternsController.index().url},"Grok
 
Patterns")):null)

Just find the condition which allows certain menu/feature for admin but not 
to the end user and add it to the system menu code. For example End user 
has no Search and source menu so find that condition and merge it with 
system menu.

Cheers!!
Anant


On Saturday, 28 November 2015 07:25:55 UTC+5:30, Scarlet Eza wrote:
>
> Dear Anant,
> Your code is look good. But when I modified app.js, it hidden system menu 
> for all roles. I attached file app.js and result when I log in with admin 
> role. Please help to check again
>
> On Friday, November 27, 2015 at 7:21:17 PM UTC+7, Anant Sawant wrote:
>>
>> Hi!!
>>
>>  Disabling System menu for End User but keep for Admin User locate the 
>> following code in app.js file 
>>
>> r.createElement(l,{title:this._systemTitle(),active:this._isActive("/system")},this.state.permissions.SOURCES_READ&(u,{href:jsRoutes.controllers.SystemController.index(0).url},"Overview"),this.state.permissions.SOURCES_READ&(u,{href:jsRoutes.controllers.NodesController.nodes().url},"Nodes"),this.state.permissions.SOURCES_READ&_isPermitted(["INPUTS_READ"])&(u,{href:jsRoutes.controllers.InputsController.index().url},"Inputs"),this._isPermitted(["OUTPUTS_READ"])&(u,{href:jsRoutes.controllers.OutputsController.index().url},"Outputs"),this._isPermitted(["COLLECTORS_READ"])&(u,{href:jsRoutes.controllers.CollectorsController.index().url},"Collectors"),this._isPermitted(["INDICES_READ"])&(u,{href:jsRoutes.controllers.IndicesController.index().url},"Indices"),this._isPermitted(["LOGGERS_READ"])&(u,{href:jsRoutes.controllers.LoggingController.index().url},"Logging"),this._isPermitted(["USERS_EDIT"])&(u,{href:jsRoutes.controllers.UsersController.index().url},"Users"),this._isPermitted(["DASHBOARDS_CREATE","INPUTS_CREATE","STREAMS_CREATE"])&(u,{href:jsRoutes.controllers.BundlesController.index().url},"Content
>>  
>> Packs"),this._isPermitted(["INPUTS_EDIT"])&(u,{href:jsRoutes.controllers.GrokPatternsController.index().url},"Grok
>>  
>> Patterns")))
>>
>> and replace with the following 
>>
>> 

[graylog2] Re: Change permission for user

2015-11-30 Thread Anant Sawant
HI!!
Try replacing this peace of code 

this.state.permissions.SOURCES_READ?t.createElement(l,{title:this._systemTitle(),active:this._isActive("/system")},this.state.permissions.SOURCES_READ&(u,{href:jsRoutes.controllers.SystemController.index(0).url},"Overview"),this.state.permissions.SOURCES_READ&(u,{href:jsRoutes.controllers.NodesController.nodes().url},"Nodes"),this.state.permissions.SOURCES_READ&_isPermitted(["INPUTS_READ"])&(u,{href:jsRoutes.controllers.InputsController.index().url},"Inputs"),this._isPermitted(["OUTPUTS_READ"])&(u,{href:jsRoutes.controllers.OutputsController.index().url},"Outputs"),this._isPermitted(["COLLECTORS_READ"])&(u,{href:jsRoutes.controllers.CollectorsController.index().url},"Collectors"),this._isPermitted(["INDICES_READ"])&(u,{href:jsRoutes.controllers.IndicesController.index().url},"Indices"),this._isPermitted(["LOGGERS_READ"])&(u,{href:jsRoutes.controllers.LoggingController.index().url},"Logging"),this._isPermitted(["USERS_EDIT"])&(u,{href:jsRoutes.controllers.UsersController.index().url},"Users"),this._isPermitted(["DASHBOARDS_CREATE","INPUTS_CREATE","STREAMS_CREATE"])&(u,{href:jsRoutes.controllers.BundlesController.index().url},"Content
 
Packs"),this._isPermitted(["INPUTS_EDIT"])&(u,{href:jsRoutes.controllers.GrokPatternsController.index().url},"Grok
 
Patterns")):null)

with


this._isPermitted(["SEARCHES_ABSOLUTE","SEARCHES_RELATIVE","SEARCHES_KEYWORD"])&_READ?t.createElement(l,{title:this._systemTitle(),active:this._isActive("/system")},this.state.permissions.SOURCES_READ&(u,{href:jsRoutes.controllers.SystemController.index(0).url},"Overview"),this.state.permissions.SOURCES_READ&(u,{href:jsRoutes.controllers.NodesController.nodes().url},"Nodes"),this.state.permissions.SOURCES_READ&_isPermitted(["INPUTS_READ"])&(u,{href:jsRoutes.controllers.InputsController.index().url},"Inputs"),this._isPermitted(["OUTPUTS_READ"])&(u,{href:jsRoutes.controllers.OutputsController.index().url},"Outputs"),this._isPermitted(["COLLECTORS_READ"])&(u,{href:jsRoutes.controllers.CollectorsController.index().url},"Collectors"),this._isPermitted(["INDICES_READ"])&(u,{href:jsRoutes.controllers.IndicesController.index().url},"Indices"),this._isPermitted(["LOGGERS_READ"])&(u,{href:jsRoutes.controllers.LoggingController.index().url},"Logging"),this._isPermitted(["USERS_EDIT"])&(u,{href:jsRoutes.controllers.UsersController.index().url},"Users"),this._isPermitted(["DASHBOARDS_CREATE","INPUTS_CREATE","STREAMS_CREATE"])&(u,{href:jsRoutes.controllers.BundlesController.index().url},"Content
 
Packs"),this._isPermitted(["INPUTS_EDIT"])&(u,{href:jsRoutes.controllers.GrokPatternsController.index().url},"Grok
 
Patterns")):null)

Just find the condition which allows certain menu/feature for admin but not 
to the end user and add it to the system menu code. For example End user 
has no Search and source menu so find that condition and merge it with 
system menu.

Cheers!!
Anant

On Saturday, 28 November 2015 07:25:55 UTC+5:30, Hitsu Yaga wrote:
>
> Dear Anant,
> Your code is look good. But when I modified app.js, it hidden system menu 
> for all roles. I attached file app.js and result when I log in with admin 
> role. Please help to check again
>
> On Friday, November 27, 2015 at 7:21:17 PM UTC+7, Anant Sawant wrote:
>>
>> Hi!!
>>
>>  Disabling System menu for End User but keep for Admin User locate the 
>> following code in app.js file 
>>
>> r.createElement(l,{title:this._systemTitle(),active:this._isActive("/system")},this.state.permissions.SOURCES_READ&(u,{href:jsRoutes.controllers.SystemController.index(0).url},"Overview"),this.state.permissions.SOURCES_READ&(u,{href:jsRoutes.controllers.NodesController.nodes().url},"Nodes"),this.state.permissions.SOURCES_READ&_isPermitted(["INPUTS_READ"])&(u,{href:jsRoutes.controllers.InputsController.index().url},"Inputs"),this._isPermitted(["OUTPUTS_READ"])&(u,{href:jsRoutes.controllers.OutputsController.index().url},"Outputs"),this._isPermitted(["COLLECTORS_READ"])&(u,{href:jsRoutes.controllers.CollectorsController.index().url},"Collectors"),this._isPermitted(["INDICES_READ"])&(u,{href:jsRoutes.controllers.IndicesController.index().url},"Indices"),this._isPermitted(["LOGGERS_READ"])&(u,{href:jsRoutes.controllers.LoggingController.index().url},"Logging"),this._isPermitted(["USERS_EDIT"])&(u,{href:jsRoutes.controllers.UsersController.index().url},"Users"),this._isPermitted(["DASHBOARDS_CREATE","INPUTS_CREATE","STREAMS_CREATE"])&(u,{href:jsRoutes.controllers.BundlesController.index().url},"Content
>>  
>> Packs"),this._isPermitted(["INPUTS_EDIT"])&(u,{href:jsRoutes.controllers.GrokPatternsController.index().url},"Grok
>>  
>> Patterns")))
>>
>> and replace with the following 
>>
>> 

[graylog2] Re: Change permission for user

2015-11-27 Thread Hitsu Yaga
Hi Anant,
I install graylog through repo and yum. It's possible to disable the System 
menu? If I want admin can access System menu and user can not, how can I 
modify it? Thanks for your help!!!

On Thursday, November 26, 2015 at 5:15:22 PM UTC+7, Anant Sawant wrote:
>
> Hi!!
>
> If you are running your own compiled source code for Graylog and not the 
> ready to run Graylog package you can simply hide this menu for end user.
> Just disable the System menu from app.js file located in the 
> "graylog-web-interface.graylog-web-interface-1.1.6-assets" jar. Or under 
> source code.
>
> Cheers,
> Anant.
>
> On Thursday, 26 November 2015 09:34:36 UTC+5:30, Hitsu Yaga wrote:
>>
>> Dear all,
>> I am also facing with this problem now. I don't want customer see 
>> anything about our node, systemHow can I do that? please advise!!!
>>
>> On Wednesday, November 25, 2015 at 11:15:02 PM UTC+7, Tiểu Yết wrote:
>>>
>>> Hi everyone,
>>> We just setup graylog server for our customers can access their logs. 
>>> Now we can do it with stream that seperate log with specific field. But 
>>> when our customer login web-interface they can access something about our 
>>> system as attached file. We only want they only access stream and 
>>> dashboard. It's possible?
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Graylog Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to graylog2+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/graylog2/c93367a6-3bd3-493e-8ba0-48af7f3f9c08%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[graylog2] Re: Change permission for user

2015-11-26 Thread Anant Sawant
Hi!!

If you are running your own compiled source code for Graylog and not the 
ready to run Graylog package you can simply hide this menu for end user.
Just disable the System menu from app.js file located in the 
"graylog-web-interface.graylog-web-interface-1.1.6-assets" jar. Or under 
source code.

Cheers,
Anant.

On Thursday, 26 November 2015 09:34:36 UTC+5:30, Hitsu Yaga wrote:
>
> Dear all,
> I am also facing with this problem now. I don't want customer see anything 
> about our node, systemHow can I do that? please advise!!!
>
> On Wednesday, November 25, 2015 at 11:15:02 PM UTC+7, Tiểu Yết wrote:
>>
>> Hi everyone,
>> We just setup graylog server for our customers can access their logs. Now 
>> we can do it with stream that seperate log with specific field. But when 
>> our customer login web-interface they can access something about our system 
>> as attached file. We only want they only access stream and dashboard. It's 
>> possible?
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Graylog Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to graylog2+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/graylog2/4bf0cf38-41da-4458-b9fa-2a770ee85927%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[graylog2] Re: Change permission for user

2015-11-25 Thread Hitsu Yaga
Dear all,
I am also facing with this problem now. I don't want customer see anything 
about our node, systemHow can I do that? please advise!!!

On Wednesday, November 25, 2015 at 11:15:02 PM UTC+7, Tiểu Yết wrote:
>
> Hi everyone,
> We just setup graylog server for our customers can access their logs. Now 
> we can do it with stream that seperate log with specific field. But when 
> our customer login web-interface they can access something about our system 
> as attached file. We only want they only access stream and dashboard. It's 
> possible?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Graylog Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to graylog2+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/graylog2/6e921ad3-0752-4a5b-ad6f-351a648a345e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.