-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Start the removal of obsolete permissions #23883
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
disable obsolete permissions (UploadPlugins, ConfigureUpdateCenter and RunScripts). * disable the permissions * mark the permissions as DoNotUse so that plugins updating core will now fail to compile * retain API compatability for now (full removal can be done for a future LTS).
| @Deprecated | ||
| public static final Permission UPLOAD_PLUGINS = new Permission(Jenkins.PERMISSIONS, "UploadPlugins", Messages._PluginManager_UploadPluginsPermission_Description(), Jenkins.ADMINISTER, PermissionScope.JENKINS); | ||
| @Deprecated(forRemoval = true) | ||
| @Restricted(DoNotUse.class) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not use @Restricted on a @Deprecated member. These are two different things with different purposes and should not be mixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in 90d00cf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, FWIW I meant to keep the @Deprecated and delete the @Restricted. That is, obviously these fields should be @Deprecated; I was asking to not add @Restricted.
(same on RUN_SCRIPTS of course)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I explicitly wanted to break source compatibility :)
its been deprecated for 5 years, devs (outside of the authZ plugins where its use is still semi legitimate) are not paying attention to it today.
| public static final Permission RUN_SCRIPTS = new Permission(PERMISSIONS, "RunScripts", Messages._Hudson_RunScriptsPermission_Description(), ADMINISTER, PermissionScope.JENKINS); | ||
| @Deprecated(forRemoval = true) | ||
| @Restricted(DoNotUse.class) | ||
| public static final Permission RUN_SCRIPTS = new Permission(PERMISSIONS, "RunScripts", Messages._Hudson_RunScriptsPermission_Description(), null, false, new PermissionScope[] {PermissionScope.JENKINS}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May as well delete localized key while we are here and replace with some text that mentions it is deprecated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the text is already "Deprecated - Please use the Overall/Administer permission instead".
Are you suggesting that we hard code the English message here and remove the translations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it already notes that it is deprecated I guess it does not matter; would just be a tiny bit of tech debt reduction to eliminate a few localizable keys since the values should never be displayed in the GUI any more.
@jglick requested not to mix deprecation and restricted annotations What we want here is to break source compatability so keeping the Restricted annotation. Whilst some plugins may have disabled the annotation checker and no longer get any warnings about this that would be their issue for using this well after it was deprecated 5 years ago.
disable obsolete permissions (UploadPlugins, ConfigureUpdateCenter and RunScripts).
DoNotUseso that plugins updating core will now fail to compileamends #4365 (released in Jenkins 2.222) relates to JEP-223 / #20740
#23873 (comment)
Testing done
ConfigureUpdateCenterrole-strategy-pluginremove obsolete permissions role-strategy-plugin#430matrix-authTBDfolder-authTBDazure-ad-pluginnectar-rbac(CloudBees internal)TBDRunScriptsscriptler-pluginfalse positivejob-dslTBDbuild-flowplugin is deprecated and suspendedmaven-pluginremove obsolete permission maven-plugin#421nectar-rbac(CloudBees internal) TBDrole-strategy-pluginremove obsolete permissions role-strategy-plugin#430matrix-authTBDopenshift-loginTBDauthorize-projectTBDfolder-authTBDgoogle-oauthTBDopenstack-cloud-pluginTBDazure-ad-pluginapp-detectorTBDsounds-pluginTBDjenkins-test-harnessremove obsolete RUN_SCRIPTS permission jenkins-test-harness#1126UploadPluginsrole-strategy-pluginremove obsolete permissions role-strategy-plugin#430matrix-authTBDfolder-authTBDazure-ad-pluginnectar-rbac(CloudBees internal)TBDProposed changelog entries
Overall/Administerpermission:Proposed changelog category
/label developer
Proposed upgrade guidelines
N/A
Submitter checklist
@Restrictedor have@since TODOJavadocs, as appropriate.@Deprecated(since = "TODO")or@Deprecated(forRemoval = true, since = "TODO"), if applicable.evalto ease future introduction of Content Security Policy (CSP) directives (see documentation).Desired reviewers
@mention
Before the changes are marked as
ready-for-merge:Maintainer checklist
upgrade-guide-neededlabel is set and there is a Proposed upgrade guidelines section in the pull request title (see example).lts-candidateto be considered.