plan-net / core4

Develop, Operate and Collaborate on Data and Analytics
Mozilla Public License 2.0
9 stars 14 forks source link

event request for not admin results always UnauthorizedJob #200

Closed basteiz closed 4 years ago

basteiz commented 4 years ago

event request always returns "UnathorizedJob"

example:

access in role: job://nielsen.*/x

return of request: wss://core4.bi.plan-net.com/core4/api/v1/event?....

data: [{zombie: false, n: 1, state: "error", name: "UnauthorizedJob", progress: 0.975609756097561,…},…]
0: {zombie: false, n: 1, state: "error", name: "UnauthorizedJob", progress: 0.975609756097561,…}
1: {zombie: false, n: 1, state: "error", name: "UnauthorizedJob", progress: 0.42694433719702685,…}
2: {zombie: false, n: 1, state: "error", name: "UnauthorizedJob", progress: null, wall: false,…}
3: {zombie: false, n: 1, state: "error", name: "UnauthorizedJob", progress: null, wall: false,…}
4: {zombie: false, n: 1, state: "running", name: "UnauthorizedJob", progress: 0.40098663174883525,…}

with coco -i:

     n state    flag name
------ -------- ---- ------------------------------------
     1 error    .... mpforschung.yougov.yougov.Downloader
     1 error    .... nielsen.job.download.FTPDownload
     1 error    .... nielsen.job.extract.ExtractFile
     1 error    .... nielsen.job.transform.TransformLoad
     1 running  .... mpforschung.yougov.yougov.Loader
m-rau commented 4 years ago

the EventHandler.onqueue method used the tested method CoreRole.has_api_access. This method has recently been changed by @MarkusKral. Issue assigned for further analysis.

m-rau commented 4 years ago

fixed with #202