I have created a DXL attribute via dxl script. To copy the values of this DXL attribute into a text attribute "newAttr" i have added the line: obj."newAttr"= richText tempStringOf(bsz) (info: bsz is a Buffer ) The dxl script works fine and writes all values from the DXL attribute into the text attribute. But when i close the module an reopen it i get an error saying: " no access to modify attribute 'newAttr' " When i open the module in edit mode there is no error occuring.
How can i set access rights for that attribute for every user, even if the user can`t open the module in edit mode? Thanks
vrenne - Mon Jan 09 06:04:27 EST 2017 |
Re: access rights to modify attributes If the user cannot open the module in edit mode (Modify(M) or Create(C) permission on module needed), that user cannot write any attribute values. Do you get the error from your DXL? Or when you manually close the module with your mouse? (In the second case, you might not get the error from your DXL, but from some trigger trying to make modifications to the module on-close). (by the way, do not use tempStringOf here. Dxl support writing buffers to attributes). Regards, Mathias |
Re: access rights to modify attributes Mathias Mamsch - Mon Jan 09 10:15:43 EST 2017 If the user cannot open the module in edit mode (Modify(M) or Create(C) permission on module needed), that user cannot write any attribute values. Do you get the error from your DXL? Or when you manually close the module with your mouse? (In the second case, you might not get the error from your DXL, but from some trigger trying to make modifications to the module on-close). (by the way, do not use tempStringOf here. Dxl support writing buffers to attributes). Regards, Mathias I get the error from my DXL. When opening the module in "read only" mode i get that error. when i open in edit mode i have no problems with any errors. |
Re: access rights to modify attributes vrenne - Mon Jan 09 10:24:54 EST 2017 I get the error from my DXL. When opening the module in "read only" mode i get that error. when i open in edit mode i have no problems with any errors. So, as I said: -> read mode => you can't write attributes. You need to give the user "M" or "C" permission on the module, but lock access to the attributes where the user must not be allowed to write. Regards, Mathias |
Re: access rights to modify attributes You can check if the attribute value can be modified by using canModify function
canModify(attribute)
Declaration
(Object o).(string attrName)
Operation
|