Topic
  • 4 replies
  • Latest Post - ‏2010-05-13T18:58:30Z by vppatel
vppatel
vppatel
43 Posts

Pinned topic Attribute Access Rights

‏2010-05-13T14:02:49Z |
Does anyone know how to set access rights for attributes via dxl? I have about 20 attributes that I need to restrict access. They are for groups and not users.

Thanks
Updated on 2010-05-13T18:58:30Z at 2010-05-13T18:58:30Z by vppatel
  • johnzweck
    johnzweck
    9 Posts

    Re: Attribute Access Rights

    ‏2010-05-13T14:43:02Z  

    According to the DXL Reference Manual:

    string set{Def|Val}(Module m, AttrDef ad, Permission ps, {string user|string group})
    


    The function setDef sets the permissions for the access list of the attribute definition ad in module m.
    The function setVal sets the permission of all values of the attribute definition ad in module m.

    John

    Updated on 2013-12-19T15:42:54Z at 2013-12-19T15:42:54Z by iron-man
  • vppatel
    vppatel
    43 Posts

    Re: Attribute Access Rights

    ‏2010-05-13T15:20:12Z  
    • johnzweck
    • ‏2010-05-13T14:43:02Z

    According to the DXL Reference Manual:

    <pre class="javascript dw" data-editor-lang="js" data-pbcklang="javascript" dir="ltr">string set{Def|Val}(Module m, AttrDef ad, Permission ps, {string user|string group}) </pre>


    The function setDef sets the permissions for the access list of the attribute definition ad in module m.
    The function setVal sets the permission of all values of the attribute definition ad in module m.

    John

    so what am i doing wrong here

    string setDef (Module m, AttrDef test, read|modify|delete|control, string xxxx)

    xxxx is the group/user name
  • johnzweck
    johnzweck
    9 Posts

    Re: Attribute Access Rights

    ‏2010-05-13T15:57:09Z  
    • vppatel
    • ‏2010-05-13T15:20:12Z
    so what am i doing wrong here

    string setDef (Module m, AttrDef test, read|modify|delete|control, string xxxx)

    xxxx is the group/user name

    Use the following:

    Module m = current
    AttrDef ad = find(m, "test")
     
    string err = setDef(m, ad, read|modify|delete|control, "GroupName")
     
    if (!null err) print err
    

     


    John

     

    Updated on 2013-12-19T15:43:35Z at 2013-12-19T15:43:35Z by iron-man
  • vppatel
    vppatel
    43 Posts

    Re: Attribute Access Rights

    ‏2010-05-13T18:58:30Z  
    • johnzweck
    • ‏2010-05-13T15:57:09Z

    Use the following:

    <pre class="javascript dw" data-editor-lang="js" data-pbcklang="javascript" dir="ltr">Module m = current AttrDef ad = find(m, "test") string err = setDef(m, ad, read|modify|delete|control, "GroupName") if (!null err) print err </pre>

     


    John

     

    Thanks, worked like a charm