JSON web service to access all files a user has access to using Javascript. (Liferay 7)

79
April 11, 2018, at 10:32 AM

I am trying to use the JSON web service API through Javascript to get files all the files from the Documents Library that a user has access to, which I attempted to use:

Liferay.Service(
    '/dlfileentry/get-group-file-entries',
    {
        groupId: gId,
        userId: userId,
        rootFolderId: 0,
        start: 0,
        end: 300,
        '-obc': ''
    },
    function(obj) {
        console.log(obj);
    }
);

However, this call only retrieves the files that were uploaded by that specific user, which is not what I want. Is there another way that would achieve retrieving all the documents that a specific user has access to view?

I thought about using the web service call:

Liferay.Service(
    '/assetentry/get-entries',
    {
    entryQuery: 
    },
    function(obj) {
        console.log(obj);
    }
);

However, I don't know if this would achieve a similar result and I don't know how to pass an AssetEntryQuery object into the entryQuery parameter.

READ ALSO
How to input text into two elements with the same class using Nightmare.js

How to input text into two elements with the same class using Nightmare.js

I am using Nightmarejs to automatically test logging into a website and I have ran into an issue:

105
After AngularJS hash removal URL refresh is not working

After AngularJS hash removal URL refresh is not working

Well, that's pretty much itI removed the hashes from the url of my AngularJS app via $locationProvider

116
Function without argument giving unidentified after output

Function without argument giving unidentified after output

I'm trying to make a javascript that picks a random string out of an array, and it does that, but after the output it always says "unidentified"It wouldn't be a big problem, except for the fact that i'm trying to do that 10-20 times, which makes the 10-20 "unidentifieds"...

69
How to clear input field with ajax

How to clear input field with ajax

How can I reset (clear) my input field on success?

112