OHDSI / ROhdsiWebApi

An R package for interfacing with a WebAPI instance
https://ohdsi.github.io/ROhdsiWebApi
10 stars 17 forks source link

Permission related functions #254

Closed gowthamrao closed 1 year ago

gowthamrao commented 2 years ago

Because this https://github.com/OHDSI/ROhdsiWebApi/pull/241 was hanging around for sometime, i am going to cherry pick and add to develop branch

Also going to copy from https://github.com/OHDSI/ROhdsiWebApi/pull/247 @alondhe

gowthamrao commented 2 years ago

I really wanted the functionality to give users permission to cohorts (large number), so i visited PR related to that. But couldnt get it to work. So i thought maybe cherry pick some of the other functions and put it in develop.

Then revisit the set permission function

gowthamrao commented 2 years ago

I added the setCohortPermission as experimental. It is "working", but i am confused if it is assigning properly

gowthamrao commented 2 years ago

After thinking this thru, talking with @anthonysena and experimenting - it turns out setCohortPermission is actually setting permission to a roleId , not a userId

So - we need to change the functions parameters.

Doing so - makes this work.

gowthamrao commented 2 years ago

Documentation is here http://webapidoc.ohdsi.org/index.html#417537417

chrisknoll commented 1 year ago

Per this discussion: https://github.com/OHDSI/ROhdsiWebApi/pull/241#discussion_r796115849, the original PR removed the validation check from saving a cohort definition (I'll ask here again: why does it make sense to prevent saving a cohort definition that has validation errors??)

That was half the point of the PR I raised in the first place, but this PR supersedes it?