diff --git a/pom.xml b/pom.xml index 795f312bb..b9ea7ec8a 100644 --- a/pom.xml +++ b/pom.xml @@ -68,8 +68,8 @@ 999999-SNAPSHOT jenkinsci/${project.artifactId}-plugin - 2.504 - ${jenkins.baseline}.3 + 2.528 + 2.544 false 1372 diff --git a/src/main/java/com/cloudbees/plugins/credentials/CredentialsStoreAction.java b/src/main/java/com/cloudbees/plugins/credentials/CredentialsStoreAction.java index 36322e573..a3f839216 100644 --- a/src/main/java/com/cloudbees/plugins/credentials/CredentialsStoreAction.java +++ b/src/main/java/com/cloudbees/plugins/credentials/CredentialsStoreAction.java @@ -28,6 +28,11 @@ import com.cloudbees.plugins.credentials.domains.Domain; import com.cloudbees.plugins.credentials.domains.DomainSpecification; import com.cloudbees.plugins.credentials.impl.BaseStandardCredentials; +import com.cloudbees.plugins.credentials.links.MoveCredentialsLink; +import com.cloudbees.plugins.credentials.links.NewCredentialsLink; +import com.cloudbees.plugins.credentials.links.NewDomainLink; +import com.cloudbees.plugins.credentials.links.UpdateCredentialsLink; +import com.cloudbees.plugins.credentials.links.UpdateDomainLink; import com.thoughtworks.xstream.converters.Converter; import com.thoughtworks.xstream.converters.MarshallingContext; import com.thoughtworks.xstream.converters.UnmarshallingContext; @@ -84,6 +89,7 @@ import org.apache.commons.lang3.StringUtils; import org.jenkins.ui.icon.IconSpec; import org.kohsuke.accmod.Restricted; +import org.kohsuke.accmod.restrictions.DoNotUse; import org.kohsuke.accmod.restrictions.NoExternalUse; import org.kohsuke.stapler.AncestorInPath; import org.kohsuke.stapler.HttpResponse; @@ -509,6 +515,11 @@ public void checkPermission(@NonNull Permission permission) throws AccessDeniedE getACL().checkPermission(permission); } + @Restricted(DoNotUse.class) // jelly + public NewDomainLink getNewDomainLink() { + return new NewDomainLink(); + } + /** * {@inheritDoc} */ @@ -580,6 +591,16 @@ public CredentialsStoreAction getParent() { return parent; } + @Restricted(DoNotUse.class) // jelly + public UpdateDomainLink getUpdateDomainLink() { + return new UpdateDomainLink(); + } + + @Restricted(DoNotUse.class) // jelly + public NewCredentialsLink getNewCredentialsLink() { + return new NewCredentialsLink(); + } + /** * Return the URL name. * @@ -1026,6 +1047,17 @@ public Api getApi() { return new Api(this); } + @Restricted(DoNotUse.class) // jelly + public UpdateCredentialsLink getUpdateLink() { + return new UpdateCredentialsLink(); + } + + @Restricted(DoNotUse.class) // jelly + public MoveCredentialsLink getMoveLink() { + return new MoveCredentialsLink(); + } + + /** * Gets the display name of the {@link Credentials}. * diff --git a/src/main/java/com/cloudbees/plugins/credentials/ManageCredentialsConfiguration.java b/src/main/java/com/cloudbees/plugins/credentials/ManageCredentialsConfiguration.java index 1b59455de..ff32261ac 100644 --- a/src/main/java/com/cloudbees/plugins/credentials/ManageCredentialsConfiguration.java +++ b/src/main/java/com/cloudbees/plugins/credentials/ManageCredentialsConfiguration.java @@ -16,8 +16,10 @@ @Restricted(NoExternalUse.class) public class ManageCredentialsConfiguration extends ManagementLink { - public String getCategoryName() { - return "SECURITY"; + @NonNull + @Override + public Category getCategory() { + return Category.SECURITY; } @Override diff --git a/src/main/java/com/cloudbees/plugins/credentials/ViewCredentialsAction.java b/src/main/java/com/cloudbees/plugins/credentials/ViewCredentialsAction.java index 8cb848c5f..5c373d61d 100644 --- a/src/main/java/com/cloudbees/plugins/credentials/ViewCredentialsAction.java +++ b/src/main/java/com/cloudbees/plugins/credentials/ViewCredentialsAction.java @@ -29,10 +29,12 @@ import edu.umd.cs.findbugs.annotations.CheckForNull; import edu.umd.cs.findbugs.annotations.NonNull; import hudson.Extension; +import hudson.ExtensionList; import hudson.model.Action; import hudson.model.Api; import hudson.model.Item; import hudson.model.ItemGroup; +import hudson.model.ManagementLink; import hudson.model.ModelObject; import hudson.model.RootAction; import hudson.model.TopLevelItem; @@ -58,6 +60,7 @@ import jenkins.model.TransientActionFactory; import org.jenkins.ui.icon.IconSpec; import org.kohsuke.accmod.Restricted; +import org.kohsuke.accmod.restrictions.DoNotUse; import org.kohsuke.accmod.restrictions.NoExternalUse; import org.kohsuke.stapler.export.Exported; import org.kohsuke.stapler.export.ExportedBean; @@ -236,6 +239,11 @@ public boolean isVisible() { return false; } + @Restricted(DoNotUse.class) // for jelly + public ManagementLink getManagementLink() { + return ExtensionList.lookupSingleton(ManageCredentialsConfiguration.class); + } + /** * Administrator's view credentials from 'Manage Jenkins'. * @param accessControlled an access controlled object. diff --git a/src/main/java/com/cloudbees/plugins/credentials/links/MoveCredentialsLink.java b/src/main/java/com/cloudbees/plugins/credentials/links/MoveCredentialsLink.java new file mode 100644 index 000000000..3864444ff --- /dev/null +++ b/src/main/java/com/cloudbees/plugins/credentials/links/MoveCredentialsLink.java @@ -0,0 +1,7 @@ +package com.cloudbees.plugins.credentials.links; + +public class MoveCredentialsLink { + public String getDisplayName() { + return Messages.MoveCredentialsLink_displayName(); + } +} diff --git a/src/main/java/com/cloudbees/plugins/credentials/links/NewCredentialsLink.java b/src/main/java/com/cloudbees/plugins/credentials/links/NewCredentialsLink.java new file mode 100644 index 000000000..aeee60861 --- /dev/null +++ b/src/main/java/com/cloudbees/plugins/credentials/links/NewCredentialsLink.java @@ -0,0 +1,7 @@ +package com.cloudbees.plugins.credentials.links; + +public class NewCredentialsLink { + public String getDisplayName() { + return Messages.NewCredentialsLink_displayName(); + } +} diff --git a/src/main/java/com/cloudbees/plugins/credentials/links/NewDomainLink.java b/src/main/java/com/cloudbees/plugins/credentials/links/NewDomainLink.java new file mode 100644 index 000000000..ed03e2aab --- /dev/null +++ b/src/main/java/com/cloudbees/plugins/credentials/links/NewDomainLink.java @@ -0,0 +1,7 @@ +package com.cloudbees.plugins.credentials.links; + +public class NewDomainLink { + public String getDisplayName() { + return Messages.NewDomainLink_displayName(); + } +} diff --git a/src/main/java/com/cloudbees/plugins/credentials/links/UpdateCredentialsLink.java b/src/main/java/com/cloudbees/plugins/credentials/links/UpdateCredentialsLink.java new file mode 100644 index 000000000..7ef1e6ebf --- /dev/null +++ b/src/main/java/com/cloudbees/plugins/credentials/links/UpdateCredentialsLink.java @@ -0,0 +1,7 @@ +package com.cloudbees.plugins.credentials.links; + +public class UpdateCredentialsLink { + public String getDisplayName() { + return Messages.UpdateCredentialsLink_displayName(); + } +} diff --git a/src/main/java/com/cloudbees/plugins/credentials/links/UpdateDomainLink.java b/src/main/java/com/cloudbees/plugins/credentials/links/UpdateDomainLink.java new file mode 100644 index 000000000..641858b1f --- /dev/null +++ b/src/main/java/com/cloudbees/plugins/credentials/links/UpdateDomainLink.java @@ -0,0 +1,7 @@ +package com.cloudbees.plugins.credentials.links; + +public class UpdateDomainLink { + public String getDisplayName() { + return Messages.UpdateDomainLink_displayName(); + } +} diff --git a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/delete.jelly b/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/delete.jelly deleted file mode 100644 index 186246216..000000000 --- a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/delete.jelly +++ /dev/null @@ -1,15 +0,0 @@ - - - - - -

${%Delete credentials}

-
-

${%confirm(it.displayName,it.typeName)}

-
- -
-
-
-
-
diff --git a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/delete.properties b/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/delete.properties deleted file mode 100644 index c2411f20f..000000000 --- a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/delete.properties +++ /dev/null @@ -1,24 +0,0 @@ -# -# The MIT License -# -# Copyright (c) 2013, CloudBees, Inc.. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -# -confirm=Are you sure you want to delete the {0} {1} credentials? diff --git a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/delete_de.properties b/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/delete_de.properties deleted file mode 100644 index dfb99752c..000000000 --- a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/delete_de.properties +++ /dev/null @@ -1,25 +0,0 @@ -# -# The MIT License -# -# Copyright (c) 2013, CloudBees, Inc., Harald Albers. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -# -confirm=Sind Sie sicher, dass Sie die "{1}"-Zugangsdaten "{0}" l\u00F6schen m\u00F6chten? -Yes=Ja diff --git a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/delete_fr.properties b/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/delete_fr.properties deleted file mode 100644 index d8fdb8e11..000000000 --- a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/delete_fr.properties +++ /dev/null @@ -1,24 +0,0 @@ -# The MIT License -# -# Copyright (c) 2014, Damien Finck -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -confirm=\u00cates-vous s\u00fbr de supprimer l''identifiant {0} {1} ? -Yes=Oui diff --git a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/delete_it.properties b/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/delete_it.properties deleted file mode 100644 index ec32ffb9a..000000000 --- a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/delete_it.properties +++ /dev/null @@ -1,24 +0,0 @@ -# The MIT License -# -# Copyright © 2020 Alessandro Menti -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -confirm=Eliminare le credenziali {0} {1}? -Yes=Sì diff --git a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/delete_ja.properties b/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/delete_ja.properties deleted file mode 100644 index e22a91bac..000000000 --- a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/delete_ja.properties +++ /dev/null @@ -1,25 +0,0 @@ -# -# The MIT License -# -# Copyright (c) 2013, Seiji Sogabe -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -# -confirm=\u8a8d\u8a3c\u60c5\u5831 \u7a2e\u985e\uff1a{1} \u540d\u79f0\uff1a{0} \u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -Yes=\u306f\u3044 diff --git a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/index.jelly b/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/index.jelly index 742b91c58..6bedad32a 100644 --- a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/index.jelly +++ b/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/index.jelly @@ -27,64 +27,120 @@ Index page --> - - - - -

${it.displayName}

-
- -
-

${%Usage}

- - - - - - -

- ${%This credential has not been recorded as used anywhere.} -
- ${%usageTrackingImperfect} -

-
- -

- ${%This credential has been recorded as used in the following places}: -
- ${%usageTrackingImperfect} -

- - - - - - - - - -
- - - ${j} - - - ${j} - - - - -
-
-
- - - -
- -

${%fingerprintDisabledWarning(app.rootUrl)}

-
-
-
-
+ + + + + +
+ +
+
+ + + + + + + + +

+ ${%This credential has not been recorded as used anywhere.} +
+ + ${%usageTrackingImperfect} + +

+
+ +

+ ${%This credential has been recorded as used in the following places}: +
+ + ${%usageTrackingImperfect} + +

+ + + + + + + + + +
+ + + ${j} + + + ${j} + + + + +
+
+
+ + + +
+ +

${%fingerprintDisabledWarning(app.rootUrl)}

+
+
+
+
+
+ + + + + + ${%Configure} + + + ${%Move} + + + + + + +
+ +
+ ${%Delete credential} +
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + +
diff --git a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/index.properties b/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/index.properties index 7a25e5873..0e5a1f827 100644 --- a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/index.properties +++ b/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/index.properties @@ -23,3 +23,4 @@ # usageTrackingImperfect=Note: usage tracking requires the cooperation of plugins and consequently may not track every use. fingerprintDisabledWarning=Credential fingerprints are disabled. +delete.credential=Are you sure you want to delete {0}? diff --git a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/move.jelly b/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/move.jelly index f863801af..21d3e0197 100644 --- a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/move.jelly +++ b/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/move.jelly @@ -1,9 +1,8 @@ - - - - -

${%Move credentials}

+ + +

${%blurb(it.displayName,it.typeName)}

@@ -26,6 +25,24 @@
-
-
+ + + + + + + + + + + + + + + + + + +
diff --git a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/sidepanel.jelly b/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/sidepanel.jelly deleted file mode 100644 index 5f0b75a1c..000000000 --- a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/sidepanel.jelly +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - diff --git a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/update.jelly b/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/update.jelly index e02b4cc8a..07b285899 100644 --- a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/update.jelly +++ b/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/CredentialsWrapper/update.jelly @@ -28,27 +28,52 @@ --> - - - -

${%Update credentials}

+ xmlns:f="/lib/form" xmlns:d="jelly:define" xmlns:local="local"> + + - + - + - + -
-
+ + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/DomainWrapper/configure.jelly b/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/DomainWrapper/configure.jelly index 36e491d41..38b9e6e58 100644 --- a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/DomainWrapper/configure.jelly +++ b/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/DomainWrapper/configure.jelly @@ -28,10 +28,10 @@ --> - - -

${%Update domain}

+ xmlns:f="/lib/form" + xmlns:d="jelly:define" xmlns:local="local"> + + @@ -54,7 +54,8 @@ items="${instance.specifications}"/> - @@ -62,6 +63,25 @@ -
-
+ + + + + + + + + + + + + + + + + + + + +
diff --git a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/DomainWrapper/delete.jelly b/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/DomainWrapper/delete.jelly deleted file mode 100644 index 5c1ad7d78..000000000 --- a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/DomainWrapper/delete.jelly +++ /dev/null @@ -1,24 +0,0 @@ - - - - -

${%Delete domain}

- - - ${%The global domain cannot be deleted} - - - ${%This credentials provider does not support deleting credential domains} - - -
-

${%Are you sure about deleting this domain and all credentials in this domain?}

-
- -
-
-
-
-
-
-
diff --git a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/DomainWrapper/delete_de.properties b/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/DomainWrapper/delete_de.properties deleted file mode 100644 index 20128b1f8..000000000 --- a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/DomainWrapper/delete_de.properties +++ /dev/null @@ -1,27 +0,0 @@ -# -# The MIT License -# -# Copyright (c) 2013, CloudBees, Inc., Harald Albers. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -# -The\ global\ domain\ cannot\ be\ deleted=Die Dom\u00E4ne "Globale Zugangsdaten" kann nicht gel\u00F6scht werden -This\ credentials\ provider\ does\ not\ support\ deleting\ credential\ domains=Dieser Zugangsdaten-Provider unterst\u00FCtzt das L\u00F6schen von Zugangsdaten-Domains nicht -Are\ you\ sure\ about\ deleting\ this\ domain\ and\ all\ credentials\ in\ this\ domain?=Sind Sie sicher, dass Sie diese Dom\u00E4ne und alle darin enthaltenen Zugangsdaten l\u00F6schen m\u00F6chten? -Yes=Ja diff --git a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/DomainWrapper/delete_fr.properties b/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/DomainWrapper/delete_fr.properties deleted file mode 100644 index 2b61116e5..000000000 --- a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/DomainWrapper/delete_fr.properties +++ /dev/null @@ -1,26 +0,0 @@ -# The MIT License -# -# Copyright (c) 2014, Damien Finck -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -The\ global\ domain\ cannot\ be\ deleted=Le domaine global ne peut pas \u00eatre supprim\u00e9 -This\ credentials\ provider\ does\ not\ support\ deleting\ credential\ domains=Ce gestionnaire d''identifiant ne supporte pas la configuration des domaines d''identifiants -Are\ you\ sure\ about\ deleting\ this\ domain\ and\ all\ credentials\ in\ this\ domain?=\u00cates-vous s\u00fbr de vouloir supprimer ce domaine ainsi que tous les identifiants de ce domaine ? -Yes=Oui diff --git a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/DomainWrapper/delete_it.properties b/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/DomainWrapper/delete_it.properties deleted file mode 100644 index ee0be2991..000000000 --- a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/DomainWrapper/delete_it.properties +++ /dev/null @@ -1,30 +0,0 @@ -# The MIT License -# -# Copyright © 2020 Alessandro Menti -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -Are\ you\ sure\ about\ deleting\ this\ domain\ and\ all\ credentials\ in\ this\ domain?=\ - Eliminare questo dominio e tutte le credenziali in esso contenute? -The\ global\ domain\ cannot\ be\ deleted=Non è possibile eliminare il dominio \ - globale -This\ credentials\ provider\ does\ not\ support\ deleting\ credential\ domains=\ - Questo provider credenziali non supporta l''eliminazione dei domini \ - credenziali. -Yes=Sì diff --git a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/DomainWrapper/delete_ja.properties b/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/DomainWrapper/delete_ja.properties deleted file mode 100644 index 8f2d082b6..000000000 --- a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/DomainWrapper/delete_ja.properties +++ /dev/null @@ -1,30 +0,0 @@ -# The MIT License -# -# Copyright (c) 2013 Seiji SOgabe -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -The\ global\ domain\ cannot\ be\ deleted=\u30b0\u30ed\u30fc\u30d0\u30eb\u30c9\u30e1\u30a4\u30f3\u306f\u524a\u9664\u3067\u304d\u307e\u305b\u3093\u3002 -This\ credentials\ provider\ does\ not\ support\ deleting\ credential\ domains=\ - \u3053\u306e\u8a8d\u8a3c\u60c5\u5831\u306e\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u306f\u3001\u30c9\u30e1\u30a4\u30f3\u306e\u524a\u9664\u306f\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u305b\u3093\u3002 -Are\ you\ sure\ about\ deleting\ this\ domain\ and\ all\ credentials\ in\ this\ domain?=\ - \u3053\u306e\u30c9\u30e1\u30a4\u30f3\u3068\u542b\u307e\u308c\u308b\u3059\u3079\u3066\u306e\u8a8d\u8a3c\u60c5\u5831\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -Yes=\u306f\u3044 - - diff --git a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/DomainWrapper/index.jelly b/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/DomainWrapper/index.jelly index cb2d6f832..a41f196e6 100644 --- a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/DomainWrapper/index.jelly +++ b/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/DomainWrapper/index.jelly @@ -24,43 +24,12 @@ ~ THE SOFTWARE. --> - - + xmlns:d="jelly:define" xmlns:local="local"> + - - - - - - - - ${%Add Credentials} - - - - - - - ${%Configure} - - - - -
- -
- ${%Delete domain} -
-
-
-
-
-
+ + +
@@ -135,6 +104,59 @@
-
-
+ + + + + + + + + + + ${%Add Credentials} + + + + + + + ${%Configure} + + + + +
+ +
+ ${%Delete domain} +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + +
diff --git a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/DomainWrapper/index.properties b/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/DomainWrapper/index.properties index 1c76ae072..75c2b29ae 100644 --- a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/DomainWrapper/index.properties +++ b/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/DomainWrapper/index.properties @@ -24,4 +24,5 @@ noCredentials=This credentials domain is empty noCredentialsCallToAction=How about adding some credentials? delete.domain=Are you sure you want to delete {0}? +delete.domain.description=This will delete all credentials in this domain. delete.credential=Are you sure you want to delete {0}? diff --git a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/DomainWrapper/newCredentials.jelly b/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/DomainWrapper/newCredentials.jelly index 254c7dbee..9a8743030 100644 --- a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/DomainWrapper/newCredentials.jelly +++ b/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/DomainWrapper/newCredentials.jelly @@ -24,14 +24,13 @@ ~ THE SOFTWARE. --> - - -

${%New credentials}

+ xmlns:f="/lib/form" xmlns:d="jelly:define" xmlns:local="local"> + + - + @@ -72,6 +71,24 @@ -
-
+ + + + + + + + + + + + + + + + + + +
diff --git a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/index.jelly b/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/index.jelly index 66652fc79..6e6dfe9b9 100644 --- a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/index.jelly +++ b/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/index.jelly @@ -24,7 +24,74 @@ --> + xmlns:d="jelly:define" xmlns:local="local"> + + + + +
+ + +
+
+ +
+ ${%credentialsCount(size(d.credentials))} + + - + ${safeDescription} + +
+
+
+ + + + + + + +
+ +
+ ${%Delete domain} +
+
+
+
+
+
+
+
+
+
+ + + + + + + + + ${%Add domain} + + + + + + + @@ -34,66 +101,21 @@ - - - - - - - - - - ${%Add domain} - - - - -
- - -
-
- -
- ${%credentialsCount(size(d.credentials))} - - - - ${safeDescription} - -
-
-
- - - - - - - -
- -
- ${%Delete domain} -
-
-
-
-
-
-
-
-
-
+ + + + + + + + + + + + + + +
diff --git a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/index.properties b/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/index.properties index 46474787c..841ca2330 100644 --- a/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/index.properties +++ b/src/main/resources/com/cloudbees/plugins/credentials/CredentialsStoreAction/index.properties @@ -1,2 +1,3 @@ credentialsCount={0} {0,choice,0#credentials|1#credential|1 - - -

${%New domain}

+ xmlns:f="/lib/form" xmlns:d="jelly:define" xmlns:local="local"> + + + @@ -43,11 +43,32 @@ -
-
+ + + + + + + + + + + + + + + + + + + + + + +
diff --git a/src/main/resources/com/cloudbees/plugins/credentials/GlobalCredentialsConfiguration/index.jelly b/src/main/resources/com/cloudbees/plugins/credentials/GlobalCredentialsConfiguration/index.jelly index 3dc57020c..55570c671 100644 --- a/src/main/resources/com/cloudbees/plugins/credentials/GlobalCredentialsConfiguration/index.jelly +++ b/src/main/resources/com/cloudbees/plugins/credentials/GlobalCredentialsConfiguration/index.jelly @@ -25,26 +25,21 @@ --> - - - -

${it.displayName}

-

-

${%LOADING}
- - - - - - - - - - - - - - -
-
+ + + + + + + + + + + + + + + + +
diff --git a/src/main/resources/com/cloudbees/plugins/credentials/ViewCredentialsAction/index.jelly b/src/main/resources/com/cloudbees/plugins/credentials/ViewCredentialsAction/index.jelly index 481629d61..20572c4e5 100644 --- a/src/main/resources/com/cloudbees/plugins/credentials/ViewCredentialsAction/index.jelly +++ b/src/main/resources/com/cloudbees/plugins/credentials/ViewCredentialsAction/index.jelly @@ -24,20 +24,10 @@ ~ THE SOFTWARE. --> - - - - - - - - - - - - + xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:c="/lib/credentials" xmlns:d="jelly:define" xmlns:local="local" xmlns:dd="/lib/layout/dropdowns"> + + + @@ -149,6 +139,36 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/com/cloudbees/plugins/credentials/common/card.css b/src/main/resources/com/cloudbees/plugins/credentials/common/card.css index 4fd9addc2..2ee8f8e7f 100644 --- a/src/main/resources/com/cloudbees/plugins/credentials/common/card.css +++ b/src/main/resources/com/cloudbees/plugins/credentials/common/card.css @@ -1,3 +1,8 @@ +/* Temporary workaround until core no longer clips dropdown menus */ +.app-settings-container__inner { + overflow-x: unset; +} + .masked-credential { opacity: 0.3; diff --git a/src/main/resources/com/cloudbees/plugins/credentials/links/Messages.properties b/src/main/resources/com/cloudbees/plugins/credentials/links/Messages.properties new file mode 100644 index 000000000..879915b9a --- /dev/null +++ b/src/main/resources/com/cloudbees/plugins/credentials/links/Messages.properties @@ -0,0 +1,5 @@ +NewDomainLink.displayName=New domain +UpdateDomainLink.displayName=Update domain +NewCredentialsLink.displayName=New credentials +MoveCredentialsLink.displayName=Move credentials +UpdateCredentialsLink.displayName=Update credentials diff --git a/src/test/java/com/cloudbees/plugins/credentials/fingerpints/FingerprintTest.java b/src/test/java/com/cloudbees/plugins/credentials/fingerpints/FingerprintTest.java index 88f4f3467..df98c76ec 100644 --- a/src/test/java/com/cloudbees/plugins/credentials/fingerpints/FingerprintTest.java +++ b/src/test/java/com/cloudbees/plugins/credentials/fingerpints/FingerprintTest.java @@ -88,7 +88,6 @@ void parameterizedBuildUsageTracked() throws Exception { JenkinsRule.WebClient wc = j.createWebClient(); HtmlPage page = wc.goTo("credentials/store/system/domain/_/credentials/secret-id"); - assertThat("Have usage tracking reported", page.getElementById("usage"), notNullValue()); assertThat("No fingerprint created until first use", page.getElementById("usage-missing"), notNullValue()); assertThat("No fingerprint created until first use", page.getElementById("usage-present"), nullValue()); @@ -110,7 +109,6 @@ void parameterizedBuildUsageTracked() throws Exception { assertThat("A job that does nothing does not use parameterized credentials", fingerprint, nullValue()); page = wc.goTo("credentials/store/system/domain/_/credentials/secret-id"); - assertThat("Have usage tracking reported", page.getElementById("usage"), notNullValue()); assertThat("No fingerprint created until first use", page.getElementById("usage-missing"), notNullValue()); assertThat("No fingerprint created until first use", page.getElementById("usage-present"), nullValue());