Start a new topic
Answered

Kinvey V3 add acl to individual entity error

Can't for the life of me seem to add reader or writer to acl with v3. Works fine with v1


using .addReader() I contintually get this error "TypeError: Cannot read property 'r' of undefined"


Here is the code.If I use the same syntax with v1 (changing the .save() method do v1 way it works fine.) Where on earth is this going wrong. Anyone else having trouble with acl addReader addWriter.


<code>

    var entity = {

                  _id: '5846117d01bde1035e7db02b',

                  title: 'book x',

                  author:'phil',

                  isbn: 25,

                  review: 25

                 };

    var acl = new Kinvey.Acl(entity);

    acl.addReader('584612a10ddebc566af252d8');

    var dataStore = Kinvey.DataStore.collection('books');

    var promise = dataStore.save(entity)


</code>




Best Answer

Hello Phil,


We have released a new version of the Javascript SDK v3.4.0 today that resolves this problem. It can be found in the download section of the Kinvey DevCenter. Please test it at your convenience and let us know if it resolves the problem to your satisfaction.


Regards,


Billy


Answer

Hello Phil,


We have released a new version of the Javascript SDK v3.4.0 today that resolves this problem. It can be found in the download section of the Kinvey DevCenter. Please test it at your convenience and let us know if it resolves the problem to your satisfaction.


Regards,


Billy

Love your work Billy Gee!


I have a work around in place so probably won't redo my code until a future release but will have a look at some point. 


Thanks for that one :)

Hello Phil,


Thanks for the kind words. It's always a team effort and thanks for you patience.


We're glad that you have a workaround in place and are making progress. When you do find the time test a new SDK, please be sure to check and see if there is a later version available too.


Regards,


Billy Gee

Phil,

I am able to reproduce this error and have escalated to engineering. I will get back to you once I have more information on it.

Thanks,
Pranav
Kinvey Support

 

Internal Note: MLIBZ-1576

 

Login or Signup to post a comment