Skip to Content
Menu
This question has been flagged
2 Replies
1939 Views

Hello,

I created a module 'module_name', i wanna hide a template_name if the current user i don't give it the grant access as 'User' or as 'Manager'.

I think it's:

<xpath expr="//div[@name="group_name" position="after" 
attrs="{'invisible': [
('the_current_user_but_no_created_uid','is','A manager'),
('the_current_user_but_no_created_uid','is','As Simple User')
]}">
<span>Thanks for all !</span>
</xpath>

Helps.
Avatar
Discard
Best Answer

Hi,

You can simply do it by using the group attribute for the field.

<field name="field_name"  groups="external_id_of_group"/>

or

<xpath expr="//div[@name='group_name']" position='attributes'>
<attribute
name="groups">external_id_of_group</attribute>
</xpath>


Thanks

Avatar
Discard
Author Best Answer

OK i'm gonna trying it.

It works so thanks.

Thanks

Avatar
Discard
Related Posts Replies Views Activity
4
May 24
4870
1
Jul 23
1241
3
Jun 23
1784
4
Jun 22
3316
3
Apr 22
4166