You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2018/07/17 12:52:11 UTC
[sling-org-apache-sling-jcr-api] 01/01: SLING-7613 - Remove
deprecation of SlingRepository.loginAdministrative()
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch feature/SLING-7613
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-api.git
commit d18eb2fa928d38d40b70a777776f66f522534c1d
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Tue Jul 17 14:51:24 2018 +0200
SLING-7613 - Remove deprecation of SlingRepository.loginAdministrative()
Update the method to no longer be deprecated, update wording in Javadoc.
---
src/main/java/org/apache/sling/jcr/api/SlingRepository.java | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/main/java/org/apache/sling/jcr/api/SlingRepository.java b/src/main/java/org/apache/sling/jcr/api/SlingRepository.java
index 48f10a1..11d33d7 100644
--- a/src/main/java/org/apache/sling/jcr/api/SlingRepository.java
+++ b/src/main/java/org/apache/sling/jcr/api/SlingRepository.java
@@ -66,10 +66,13 @@ public interface SlingRepository extends Repository {
* {@link #login(javax.jcr.Credentials, String)} or
* {@link Session#impersonate(javax.jcr.Credentials)} must be used.</i></b>
* <p>
- * This method is deprecated. Services running in the Sling system should
+ * Use of this method is not recommended except in very well-defined
+ * scenarios. Services running in the Sling system should
* use the {@link #loginService(String serviceInfo, String workspace)}
* method instead. Implementations of this method must throw
* {@code javax.jcr.LoginException} if they don't support it.
+ * <p>This method was deprecated as of 2.2 but the deprecation was removed
+ * in 2.4.2 as there is no perfect replacement.
*
* @param workspace The name of the workspace to which to get an
* administrative session. If <code>null</code> the
@@ -79,11 +82,7 @@ public interface SlingRepository extends Repository {
* the implementation.
* @throws RepositoryException If an error occurs creating the
* administrative session
- * @deprecated as of 2.2 (bundle version 2.2.0) because of inherent security
- * issues. Services requiring specific permissions should use
- * the {@link #loginService(String, String)} instead.
- */
- @Deprecated
+ */
@Nonnull Session loginAdministrative(String workspace) throws LoginException, RepositoryException;
/**