Skip to content

Commit

Permalink
[irods#7626] ModDataObjMeta: Fix ADMIN_KW usage with ALL_KW
Browse files Browse the repository at this point in the history
The ADMIN_KW appears to not work when used with the ALL_KW. This is
because getDataObjInfoIncSpecColl is called without passing along the
ADMIN_KW. If the admin does not have permissions on the data object
in question, CAT_NO_ACCESS_PERMISSION is returned regardless of whether
the ADMIN_KW was used.

This commit passes the ADMIN_KW along to getDataObjInfoIncSpecColl.
  • Loading branch information
alanking committed Apr 5, 2024
1 parent 1232073 commit a485f76
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/api/src/rsModDataObjMeta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ _rsModDataObjMeta( rsComm_t *rsComm, modDataObjMeta_t *modDataObjMetaInp ) {

std::memset(&dataObjInp, 0, sizeof(dataObjInp));
rstrcpy( dataObjInp.objPath, dataObjInfo->objPath, MAX_NAME_LEN );
if (const char* admin_kw = getValByKey(regParam, ADMIN_KW); admin_kw) {
addKeyVal(&dataObjInp.condInput, ADMIN_KW, admin_kw);
}
status = getDataObjInfoIncSpecColl( rsComm, &dataObjInp, &dataObjInfoHead );

if ( status < 0 ) {
Expand Down

0 comments on commit a485f76

Please sign in to comment.