Skip to content

TDL/Power User Permission/Role - #12676

Open
qqmyers wants to merge 12 commits into
IQSS:developfrom
GlobalDataverseCommunityConsortium:TDL/PowerAdmin
Open

TDL/Power User Permission/Role#12676
qqmyers wants to merge 12 commits into
IQSS:developfrom
GlobalDataverseCommunityConsortium:TDL/PowerAdmin

Conversation

@qqmyers

@qqmyers qqmyers commented Sep 9, 2026

Copy link
Copy Markdown
Member

What this PR does / why we need it: As discussed in #10588, multi-institution Dataverse instances (and possibly others) would like to delegate some functionality that is normally restricted to superusers to users managing specific collections/datasets/files, e.g. for a given institution.

This PR addresses some of that, creating a new ScopedPowerUser permission and Power User role that includes it. Someone who is assigned this role (or a custom role with this permission) for a given collection/dataset/file is allowed to use any functionality previously restricted to superusers that is directly associated with that collection, dataset, or file, i.e. to change the file store used, PID provider, etc.

The PR does not address superuser functionality that is global, e.g. managing users, configuring Harvesting Servers, etc.

Which issue(s) this PR closes:

  • Closes #

Special notes for your reviewer: This is a relatively large PR due to the breadth of functionality involved, but the main design is simple - calls to check if a user isSuperuser() are replaced with checks for is PowerUser(user, dvobject) that first checks if the user is a superuser and, if not, checks to see if they have an assignment that gives them the ScopedPowerUser permission on the dvobject specified. That pattern repeats across many api calls and commands, etc.

The ScopedPowerUser permission and "Power User" role names can be changed if there are better options. The issue suggests Institutional Admin as the role, but Institutional seems limited to that specific use case. The role is currently defined as a built-in role (e.g. with a flyway script to add it) but it could nominally be a custom role if there are concerns (so no role would have the ScopedPowerUser permission out-of-the-box.

Suggestions on how to test this: The unit tests included check the underlying changes to isPowerUser() and related methods which are used repeatedly, To check at the API/UI level, run any superuser functionality as a superuser, someone assigned the new role, or a normal user and confirm that superusers and only Power Users with an assignment on the given dvobject (or parent) succeed.

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

Is there a release notes update needed for this change?:

Additional documentation:

qqmyers added 10 commits June 12, 2026 14:43
 Summary
   • Implemented the first stage of the Scoped Power Admin feature.
   • Added a new ScopedPowerAdmin permission and a PowerAdmin role alias.
   • Created isPowerUser functionality and integrated it into the setStorageDriver API call.

   Changes
   • Modified Permission.java to include the ScopedPowerAdmin permission.
   • Updated DataverseRole.java with a new POWER_ADMIN role constant.
   • Added isPowerUser(AuthenticatedUser user, DvObject dvo) to PermissionServiceBean.java to check for superuser status or the new
   permission.
   • Updated the setStorageDriver method in Dataverses.java to use permissionSvc.isPowerUser instead of a hardcoded isSuperuser
   check.
   • Added localized strings for the new permission and role in Bundle.properties and BuiltInRoles.properties.
# Conflicts:
#	src/main/java/edu/harvard/iq/dataverse/DataversePage.java
#	src/main/java/edu/harvard/iq/dataverse/PermissionsWrapper.java
#	src/main/java/edu/harvard/iq/dataverse/api/Access.java
#	src/main/java/edu/harvard/iq/dataverse/api/Datasets.java
#	src/main/java/edu/harvard/iq/dataverse/api/Dataverses.java
#	src/main/java/edu/harvard/iq/dataverse/engine/command/impl/DeleteDataverseLinkingDataverseCommand.java
#	src/main/java/edu/harvard/iq/dataverse/engine/command/impl/LinkDataverseCommand.java
@qqmyers qqmyers added this to the 6.13 milestone Sep 9, 2026
@qqmyers qqmyers moved this to Ready for Triage in IQSS Dataverse Project Sep 9, 2026
@qqmyers qqmyers added the Size: 20 A percentage of a sprint. 14 hours. label Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Size: 20 A percentage of a sprint. 14 hours.

Projects

Status: Ready for Triage

Development

Successfully merging this pull request may close these issues.

1 participant