This is a migrated thread and some comments may be shown as answers.

ACL permissions on DataType did not work initially (possible issue, possible fix)

2 Answers 30 Views
Bugs & Issues
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
ptw
Top achievements
Rank 1
ptw asked on 16 Nov 2016, 07:17 AM

Hi,

This may be an issue, or perhaps some glitch I somehow created. This is just in case anyone strikes a similar situation ...

Situation:

Basically, my previously-working ACL (read/update/delete) permissions didn't work in a new project. (They were being ignored somehow and my dataSource was not returning items for which the current user had read permissions).

Method:

- I copied an entire project with its dataType structures (via Platform Apps list, then gear wheel, and the duplicate data option).

- My project code sets ACL permissions for user access to a data Type. I confirmed the code was working and that ACL values were being via Platform Admin / backend services.

- However, as indicated above, the ACL seemed to be being ignored and my dataSource was not returning items for which the current user had read permissions. 

Resolution?

I tried various things to understand why this was happening, but couldn't spot why. 

Eventually I tried adding an ACL permission to a data item manually (via Platform Admin/backend). After I'd done this, all of the ACLs started working.

Action:

(None suggested. Just an FYI to others. I'll post further details if I manage to replicate it when I've got some time).

Regards

-Paul

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Martin
Telerik team
answered on 17 Nov 2016, 03:54 PM
Hi Paul,

Thank you for the detailed description of the problem. I tried to reproduce it but to no avail. If it is convenient for you could you please share  what code you use to set the ACL permissions programatically?

Could it be that you are using hard-coded RoleIds and/or ContentTypeIds in your project to set the user permissions for a data Type that apply for the original project? That way when you duplicate the code and data structure, the new project gets generated new RoleIds and ContentTypeIds.

Regards,
Martin
Telerik by Progress
 
Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
 
0
ptw
Top achievements
Rank 1
answered on 18 Nov 2016, 05:16 AM

Many thanks Martin,

Found it. All good ... my mistake. I've been pulling apart code and testing for a day to figure what was going on. Turned out that, as I re-initialised my app, some of the data item owners had changed. This meant that, in some cases, the attempts to change acl permissions were coming from a person other than the data item owner. (And as you'd expect, everlive/backend services rejected the acl change).

So for anyone else who finds acl permissions not working as expected ... confirm the acl changes are coming from the owner of the data item. (And even if the acl transaction appears in the log, check the response code).

Regards

-Paul

Tags
Bugs & Issues
Asked by
ptw
Top achievements
Rank 1
Answers by
Martin
Telerik team
ptw
Top achievements
Rank 1
Share this question
or