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 2017/11/07 09:49:19 UTC
[sling-org-apache-sling-jcr-jackrabbit-usermanager] annotated tag
org.apache.sling.jcr.jackrabbit.usermanager-2.2.2 created (now e7a5bef)
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a change to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git.
at e7a5bef (tag)
tagging 84278a97511148cb9835e9606bc02e35e12e5ff8 (commit)
by Carsten Ziegeler
on Tue Sep 16 14:33:45 2014 +0000
- Log -----------------------------------------------------------------
org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
-----------------------------------------------------------------------
This annotated tag includes the following new commits:
new 8b60a66 SLING-875 add new jackrabbit-usermanager module (thanks Eric for providing)
new 854533d SLING-875: New Bundle for a ResourceProvider and Sling Post Operations for interacting with the jackrabbit UserManager https://issues.apache.org/jira/browse/SLING-875
new 9b865b8 SLING-941: Lots of svn:eol-style settings missing
new 2745b63 Use released version of jackrabbit api
new 72ad816 Use jackrabbit api bundle instead of Sling's obsolete version.
new 3164640 Use release parent pom
new 87d5271 Use released version as dependencies.
new e512ac0 [maven-release-plugin] prepare release org.apache.sling.jcr.jackrabbit.usermanager-2.0.0-incubator
new 70ae9d9 [maven-release-plugin] prepare for next development iteration
new 38e866b Use next dev version of parent pom
new c2c00c8 Add missing licence, notice etc.
new 8da015d Prepare new release.
new c7de9ac [maven-release-plugin] prepare release org.apache.sling.jcr.jackrabbit.usermanager-2.0.2-incubator
new d17523d [maven-release-plugin] prepare for next development iteration
new 87eba80 Use next parent pom for development.
new 3965a10 Set parent pom to released version.
new a034d92 Formatting ...
new 3a34397 SLING-995 Applying patch by Ian Boston (thanks)
new 80ad2b5 Refactor everything below a "private" impl package. This clearly indicates that nothing contained in this bundle is intended to be exported.
new 62307ef Remove empty folder
new 5fdd16c Replace tabs by spaces, remove unneeded javadoc plugin configuration, remove empty bundle plugin configuration
new b48249e Move Sling to new TLP location
new 1d4d4db SLING-1011 : Remove disclaimer file.
new 0884ed7 SLING-1011 : Adjust svn location
new eea03d2 SLING-1011 : Remove disclaimer from readme's, adjust links to webite, fix versions in poms.
new 8048a2b SLING-1016: Make membership management depend on the principal name not the URI of the principal, since the principal name is already unique. https://issues.apache.org/jira/browse/SLING-1016 Patch provided by Ian Boston.
new 7a0d301 SLING-1033 Upgrade to Sling parent POM 6 (and ensure web app has the leglize stuff, too)
new be2ee7c SLING-940 Applied patch from myself. Adds Javadoc to accessmanager and usermanager servlets.
new 85ff313 SLING-1067 Fixed by checking the session cound to the request to see if its an administrator. If the user is an administrator they can register other users.
new 3627954 Use official release instead of incubator release.
new 0336ccc Update to latest Sling releases.
new 9166924 SLING-1205 Upgrade all projects to parent POM 8 and use OSGi provided OSGi libraries
new 3e7a727 SLING-1208 As of Jackrabbit 1.6 the protected properties of the repository reflection of users and groups are not returned as Authorizable properties any more. Therefore the rep:principalName property which is checked in the integration test does not exist any longer. Likeweis the rep:password is not returned any more, so we have to use a (hacky) workaround.
new d72e1f5 SLING-1208 Wrong commit, we should not re-add the rep:principalName property
new a85b4aa SLING-1208 Require Jackrabbit API 1.6 to be sure ...
new a8f060f Update notice files.
new 1b53876 [maven-release-plugin] prepare release org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
new cba8357 [maven-release-plugin] prepare for next development iteration
new be4db51 SLING-1378 Provide useful toString implementation
new e9b4cac SLING-1379 Support adapt to User and Group
new ae11ef6 SLING-1377 Use PrincipalManager.getPrincipals method to list groups and users
new 115a972 SLING-1377 use the actual searchType to find principals and remove old comment
new 46c01fc SLING-1212 - upgrading to Jackrabbit 2. Also includes re-revert of SLING-1363 and implementation of SLING-1330. Thanks to Felix for getting this started.
new c06d6a5 SLING-1453 Provide AuthorizablePrivilegesInfo service to help user/group management scripts query what the current user is allowed to do
new cb2b1ff added missing license headers
new f59c6d0 SLING-1517 - fixing Maven 3 warnings and switching to released version of animal sniffer
new 5257882 Use released parent pom.
new 6590355 SLING-1557 - adding members and declaredMembers properties for groups and memberOf and declaredMemberOf properties for users and groups
new 0a4869d SLING-1577 - using full property path instead of simple property name in creation of RequestProperty object
new 396718f SLING-1193 - updating jackrabbit-usermanager module
new 7f905a7 SLING-1578 reduce code duplication between post servlet and usermanager
new cececbf SLING-1639 Disabling user self-registration is not working
new 5b0e71b SLING-1642 User self-registration should be disabled by default
new b195421 Use latest Sling API release
new aadce9e SLING-1676 Let UserManager POST servlets return JSON
new 4cff8f9 SLING-1698 - setting explicit export version
new 8610f04 updating all modules to parent 10-SNAPSHOT in anticipation of emma additions to parent
new 3dab521 using released version of servlet modules
new c6e89d2 updating pom files pre-release
new 4847ba4 [maven-release-plugin] prepare release org.apache.sling.jcr.jackrabbit.usermanager-2.1.0
new c11dee6 [maven-release-plugin] prepare for next development iteration
new dfa77d8 using latest parent
new 310e566 Update to recent snapshots
new a8c3954 Use latest releases.
new a1c4e89 correct some errors in the javadocs
new c9dbf96 SLING-2066 improve error reporting for validation errors
new 66850fe SLING-2067 Added null check to AuthorizablePrivilegesInfo to fix NPE when used in a script that is being rendered for the anonymous user
new 418e4bf SLING-2070 Members of the UserAdmin group can not create a new user
new f11888d SLING-2069 PW reset through administrator is not possible. Following the jackrabbit model, members of the UserAdmin group can set the password of other users.
new 58d6a66 SLING-2072 Add support for disabling users
new be7b76f revert change from revision 1100034 that checked in by accident.
new 82447c7 SLING-1555 UserManager permissions manipulation services that mirror the functionality of the REST operations for programmatic user management code.
new 02e241e cleanup metatype labels
new 1a245d7 SLING-2150 : Update plugins to use the latest available versions
new b85163e Update to recent snapshot
new 98ca2bb Using latest released parent pom
new 21090ca SLING-2187 - adding new module to contain our custom notice file; adding remote-resources plugin configuration to parent pom and removing all existing appended-resources NOTICE files
new a6ab92c temporarily using snapshots during release vote
new a998711 using latest releases
new a8e4735 tabs -> spaces
new 11466dd tabs -> spaces
new d05da80 bumping package export version and adding since tags
new 67a0bab [maven-release-plugin] prepare release org.apache.sling.jcr.jackrabbit.usermanager-2.2.0
new d236f63 [maven-release-plugin] prepare for next development iteration
new 6424c89 SLING-2305 UserManager - Convert @scr JavaDoc Tags to SCR Annotations
new b8a913a SLING-2308 Remove user password digesting from sling
new 6bf3da3 SLING-2312 - adding adapter annotations in usermanager bundle
new 273b92f Add scope provided to dependencies
new 582d964 using next snapshots during release process
new 4c507d3 Use released adapter annotations.
new 54c89a9 Use released maven sling plugin
new e8733d7 SLING-2480 : Add config for maven-sling-plugin to m2e configuration
new c898f4d SLING-2483 Update jackrabbit.server and jcr.base dependencies and add JCR API dependency to prevent the new bundle plugin to generate a too restrictive import for the JCR API (2.0 is backwards compatible with 1.0)
new 08089b2 SLING-2465 Applied patch from Eric to set user path when creating a user that the creator can't 'see'
new ce391d1 Use version from parent pom
new ffa336b Update to latest parent pom
new 82f2e13 Use released versions
new 78c3704 SLING-2644 - Make the jackrabbit/accessmanager and jackrabbit/usermanager to work with newer servlets/post bundle
new 28f6568 Use latest releases and update to new parent pom
new b79048a Update to latest parent pom and use latest releases in launchpad
new 9bf5045 SLING-2739 : Add methods for handling the resource type hierarchy to the resource resolver
new 184a655 Use released versions after release.
new 094fc33 Correct reactor pom and update to parent pom 16
new 5acc1e9 Update to latest parent pom
new 5a5f0de SLING-2944 Revert Sling API dependency to 2.2.0 again
new 01e335d Update to parent pom 18
new 767a7ba SLING-3286 - Remove plugin version overrides from poms
new f33d41d Update to parent pom v19
new 38b3d0a align code/javadoc
new 3528bfb style/cleanup
new c13e8d2 SLING-3738 fix path prefix (use user instead of group) on password modification
new 9e62cac Clean up usage of SCR annotations
new fb4df9a Fix missing definition of servlet.post.dateFormats in CreateGroupServlet and UpdateGroupServlet
new a595d6c Updated to parent version 20
new a1aff87 [maven-release-plugin] prepare release org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
new 84278a9 [maven-release-plugin] copy for tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
The 116 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
--
To stop receiving notification emails like this one, please contact
['"commits@sling.apache.org" <co...@sling.apache.org>'].
[sling-org-apache-sling-jcr-jackrabbit-usermanager] 31/33: Updated
to parent version 20
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit a595d6c40fbd9b844eb2559b7a08f125cebf7755
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Fri Aug 1 19:16:26 2014 +0000
Updated to parent version 20
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@1615208 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 91a1c95..a918b5a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>19</version>
+ <version>20</version>
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-jackrabbit-usermanager] 13/33: Update
to latest parent pom
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit ffa336b52734db560c80667be4a28a805833601e
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Jul 5 09:29:47 2012 +0000
Update to latest parent pom
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@1357521 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 4b7b96a..35a2fff 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>13-SNAPSHOT</version>
+ <version>14-SNAPSHOT</version>
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-jackrabbit-usermanager] 10/33:
SLING-2483 Update jackrabbit.server and jcr.base dependencies and add JCR
API dependency to prevent the new bundle plugin to generate a too
restrictive import for the JCR API (2.0 is backwards compatible with 1.0)
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit c898f4d20614804ef4396b25386f1e0dc7947059
Author: Felix Meschberger <fm...@apache.org>
AuthorDate: Sat May 19 09:46:55 2012 +0000
SLING-2483 Update jackrabbit.server and jcr.base dependencies and add JCR API dependency to prevent the new bundle plugin to generate a too restrictive import for the JCR API (2.0 is backwards compatible with 1.0)
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@1340393 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 41e84b1..7f0100d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -117,10 +117,14 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.jcr.base</artifactId>
- <version>2.0.4-incubator</version>
+ <version>2.0.6</version>
<scope>provided</scope>
</dependency>
<dependency>
+ <groupId>javax.jcr</groupId>
+ <artifactId>jcr</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
</dependency>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-jackrabbit-usermanager] 02/33:
SLING-2305 UserManager - Convert @scr JavaDoc Tags to SCR Annotations
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit 6424c896c32498423e8d23a6e0c63dc5c679d346
Author: Eric Norman <en...@apache.org>
AuthorDate: Wed Nov 30 02:58:56 2011 +0000
SLING-2305 UserManager - Convert @scr JavaDoc Tags to SCR Annotations
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@1208227 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 +++
.../impl/AuthorizablePrivilegesInfoImpl.java | 44 +++++++-------
.../impl/post/AbstractAuthorizablePostServlet.java | 17 ++++--
.../impl/post/AbstractUserPostServlet.java | 2 +
.../impl/post/ChangeUserPasswordServlet.java | 47 +++++++++------
.../usermanager/impl/post/CreateGroupServlet.java | 33 +++++++----
.../usermanager/impl/post/CreateUserServlet.java | 69 +++++++++++-----------
.../impl/post/DeleteAuthorizableServlet.java | 38 ++++++++----
.../usermanager/impl/post/UpdateGroupServlet.java | 31 +++++++---
.../usermanager/impl/post/UpdateUserServlet.java | 30 ++++++----
.../resource/AuthorizableResourceProvider.java | 24 +++++---
11 files changed, 217 insertions(+), 126 deletions(-)
diff --git a/pom.xml b/pom.xml
index 03abe2f..7f4a388 100644
--- a/pom.xml
+++ b/pom.xml
@@ -125,5 +125,13 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.scr.annotations</artifactId>
+ <version>1.6.0</version>
+ <scope>provided</scope>
+ </dependency>
+
</dependencies>
</project>
\ No newline at end of file
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/AuthorizablePrivilegesInfoImpl.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/AuthorizablePrivilegesInfoImpl.java
index 435563c..641f8a1 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/AuthorizablePrivilegesInfoImpl.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/AuthorizablePrivilegesInfoImpl.java
@@ -25,6 +25,10 @@ import javax.jcr.RepositoryException;
import javax.jcr.Session;
import javax.servlet.Servlet;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Properties;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Service;
import org.apache.jackrabbit.api.security.user.Authorizable;
import org.apache.jackrabbit.api.security.user.Group;
import org.apache.jackrabbit.api.security.user.User;
@@ -59,42 +63,35 @@ import org.slf4j.LoggerFactory;
* <li>group membership can only be edited by members of the 'Group administrator'
* and the 'User administrator' group.</li>
* </ul>
- *
- * @scr.component immediate="true" metatype="no"
- * @scr.service
- *
- * @scr.property name="service.description" value="User/Group Privileges Information"
- * @scr.property name="service.vendor" value="The Apache Software Foundation"
*/
+@Component (immediate=true, metatype=true)
+@Service (value=AuthorizablePrivilegesInfo.class)
+@Properties ({
+ @Property (name="service.description",
+ value="User/Group Privileges Information"),
+ @Property (name="service.vendor",
+ value="The Apache Software Foundation")
+})
public class AuthorizablePrivilegesInfoImpl implements AuthorizablePrivilegesInfo {
/** default log */
private final Logger log = LoggerFactory.getLogger(getClass());
/**
- * The name of the configuration parameter providing the
- * 'User administrator' group name.
- *
- * @scr.property valueRef="DEFAULT_USER_ADMIN_GROUP_NAME"
- */
- private static final String PAR_USER_ADMIN_GROUP_NAME = "user.admin.group.name";
-
- /**
* The default 'User administrator' group name
*
* @see #PAR_USER_ADMIN_GROUP_NAME
*/
private static final String DEFAULT_USER_ADMIN_GROUP_NAME = "UserAdmin";
- private String userAdminGroupName = DEFAULT_USER_ADMIN_GROUP_NAME;
-
/**
* The name of the configuration parameter providing the
- * 'Group administrator' group name.
- *
- * @scr.property valueRef="DEFAULT_GROUP_ADMIN_GROUP_NAME"
+ * 'User administrator' group name.
*/
- private static final String PAR_GROUP_ADMIN_GROUP_NAME = "group.admin.group.name";
+ @Property (value=DEFAULT_USER_ADMIN_GROUP_NAME)
+ private static final String PAR_USER_ADMIN_GROUP_NAME = "user.admin.group.name";
+
+ private String userAdminGroupName = DEFAULT_USER_ADMIN_GROUP_NAME;
/**
* The default 'User administrator' group name
@@ -103,6 +100,13 @@ public class AuthorizablePrivilegesInfoImpl implements AuthorizablePrivilegesInf
*/
private static final String DEFAULT_GROUP_ADMIN_GROUP_NAME = "GroupAdmin";
+ /**
+ * The name of the configuration parameter providing the
+ * 'Group administrator' group name.
+ */
+ @Property (value=DEFAULT_GROUP_ADMIN_GROUP_NAME)
+ private static final String PAR_GROUP_ADMIN_GROUP_NAME = "group.admin.group.name";
+
private String groupAdminGroupName = DEFAULT_GROUP_ADMIN_GROUP_NAME;
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractAuthorizablePostServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractAuthorizablePostServlet.java
index 08c97b4..96239be 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractAuthorizablePostServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractAuthorizablePostServlet.java
@@ -33,6 +33,8 @@ import javax.jcr.Value;
import javax.jcr.ValueFactory;
import javax.servlet.ServletException;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Property;
import org.apache.jackrabbit.api.security.user.Authorizable;
import org.apache.sling.api.SlingIOException;
import org.apache.sling.api.request.RequestParameter;
@@ -47,16 +49,19 @@ import org.osgi.service.component.ComponentContext;
/**
* Base class for all the POST servlets for the UserManager operations
*/
+@Component (componentAbstract=true)
public abstract class AbstractAuthorizablePostServlet extends
AbstractPostServlet {
private static final long serialVersionUID = -5918670409789895333L;
- /**
- * @scr.property values.0="EEE MMM dd yyyy HH:mm:ss 'GMT'Z"
- * values.1="yyyy-MM-dd'T'HH:mm:ss.SSSZ"
- * values.2="yyyy-MM-dd'T'HH:mm:ss" values.3="yyyy-MM-dd"
- * values.4="dd.MM.yyyy HH:mm:ss" values.5="dd.MM.yyyy"
- */
+ @Property (value={
+ "EEE MMM dd yyyy HH:mm:ss 'GMT'Z",
+ "yyyy-MM-dd'T'HH:mm:ss.SSSZ",
+ "yyyy-MM-dd'T'HH:mm:ss",
+ "yyyy-MM-dd",
+ "dd.MM.yyyy HH:mm:ss",
+ "dd.MM.yyyy"
+ })
private static final String PROP_DATE_FORMAT = "servlet.post.dateFormats";
private DateParser dateParser;
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractUserPostServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractUserPostServlet.java
index 90071b3..c3e188e 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractUserPostServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractUserPostServlet.java
@@ -20,12 +20,14 @@ import java.io.UnsupportedEncodingException;
import java.security.NoSuchAlgorithmException;
import java.util.Dictionary;
+import org.apache.felix.scr.annotations.Component;
import org.apache.jackrabbit.util.Text;
import org.osgi.service.component.ComponentContext;
/**
* Base class for servlets manipulating users
*/
+@Component (componentAbstract=true)
public abstract class AbstractUserPostServlet extends
AbstractAuthorizablePostServlet {
private static final long serialVersionUID = -8401210711297654453L;
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java
index 1f6fdfd..3b473c0 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java
@@ -24,6 +24,12 @@ import javax.jcr.Credentials;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
import javax.jcr.SimpleCredentials;
+import javax.servlet.Servlet;
+
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Properties;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Service;
import org.apache.jackrabbit.api.security.user.Authorizable;
import org.apache.jackrabbit.api.security.user.Group;
import org.apache.jackrabbit.api.security.user.User;
@@ -77,16 +83,22 @@ import org.slf4j.LoggerFactory;
* </code>
*
* <h4>Notes</h4>
- *
- *
- * @scr.component immediate="true" label="%changeUserPassword.post.operation.name"
- * description="%changeUserPassword.post.operation.description"
- * @scr.service interface="javax.servlet.Servlet"
- * @scr.service interface="org.apache.sling.jackrabbit.usermanager.ChangeUserPassword"
- * @scr.property name="sling.servlet.resourceTypes" value="sling/user"
- * @scr.property name="sling.servlet.methods" value="POST"
- * @scr.property name="sling.servlet.selectors" value="changePassword"
*/
+@Component (immediate=true, metatype=true,
+ label="%changeUserPassword.post.operation.name",
+ description="%changeUserPassword.post.operation.description")
+@Service (value={
+ Servlet.class,
+ ChangeUserPassword.class
+})
+@Properties ({
+ @Property (name="sling.servlet.resourceTypes",
+ value="sling/user"),
+ @Property (name="sling.servlet.methods",
+ value="POST"),
+ @Property (name="sling.servlet.selectors",
+ value="changePassword")
+})
public class ChangeUserPasswordServlet extends AbstractUserPostServlet implements ChangeUserPassword {
private static final long serialVersionUID = 1923614318474654502L;
@@ -96,21 +108,20 @@ public class ChangeUserPasswordServlet extends AbstractUserPostServlet implement
private final Logger log = LoggerFactory.getLogger(getClass());
/**
- * The name of the configuration parameter providing the
- * name of the group whose members are allowed to reset the password
- * of a user without the 'oldPwd' value.
- *
- * @scr.property valueRef="DEFAULT_USER_ADMIN_GROUP_NAME"
- */
- private static final String PAR_USER_ADMIN_GROUP_NAME = "user.admin.group.name";
-
- /**
* The default 'User administrator' group name
*
* @see #PAR_USER_ADMIN_GROUP_NAME
*/
private static final String DEFAULT_USER_ADMIN_GROUP_NAME = "UserAdmin";
+ /**
+ * The name of the configuration parameter providing the
+ * name of the group whose members are allowed to reset the password
+ * of a user without the 'oldPwd' value.
+ */
+ @Property (value=DEFAULT_USER_ADMIN_GROUP_NAME)
+ private static final String PAR_USER_ADMIN_GROUP_NAME = "user.admin.group.name";
+
private String userAdminGroupName = DEFAULT_USER_ADMIN_GROUP_NAME;
// ---------- SCR integration ---------------------------------------------
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateGroupServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateGroupServlet.java
index a2e5c47..9ffe6b0 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateGroupServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateGroupServlet.java
@@ -22,7 +22,13 @@ import java.util.Map;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
+import javax.servlet.Servlet;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Properties;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.Service;
import org.apache.jackrabbit.api.security.user.Authorizable;
import org.apache.jackrabbit.api.security.user.Group;
import org.apache.jackrabbit.api.security.user.UserManager;
@@ -30,13 +36,13 @@ import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.api.resource.ResourceResolver;
import org.apache.sling.api.servlets.HtmlResponse;
-import org.apache.sling.servlets.post.impl.helper.RequestProperty;
import org.apache.sling.jackrabbit.usermanager.CreateGroup;
import org.apache.sling.jackrabbit.usermanager.impl.resource.AuthorizableResourceProvider;
import org.apache.sling.jcr.base.util.AccessControlUtil;
import org.apache.sling.jcr.resource.JcrResourceResolverFactory;
import org.apache.sling.servlets.post.Modification;
import org.apache.sling.servlets.post.SlingPostConstants;
+import org.apache.sling.servlets.post.impl.helper.RequestProperty;
/**
* <p>
@@ -75,19 +81,26 @@ import org.apache.sling.servlets.post.SlingPostConstants;
* </code>
*
* <h4>Notes</h4>
- *
- * @scr.component immediate="true" label="%createGroup.post.operation.name"
- * description="%createGroup.post.operation.description"
- * @scr.service interface="javax.servlet.Servlet"
- * @scr.service interface="org.apache.sling.jackrabbit.usermanager.CreateGroup"
- * @scr.property name="sling.servlet.resourceTypes" value="sling/groups"
- * @scr.property name="sling.servlet.methods" value="POST"
- * @scr.property name="sling.servlet.selectors" value="create"
*/
+@Component (immediate=true, metatype=true,
+ label="%createGroup.post.operation.name",
+ description="%createGroup.post.operation.description")
+@Service (value={
+ Servlet.class,
+ CreateGroup.class
+})
+@Properties ({
+ @Property (name="sling.servlet.resourceTypes",
+ value="sling/groups"),
+ @Property (name="sling.servlet.methods",
+ value="POST"),
+ @Property (name="sling.servlet.selectors",
+ value="create")
+})
public class CreateGroupServlet extends AbstractGroupPostServlet implements CreateGroup {
private static final long serialVersionUID = -1084915263933901466L;
- /** @scr.reference */
+ @Reference
private JcrResourceResolverFactory resourceResolverFactory;
/*
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java
index 23c622e..c7abaf6 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java
@@ -22,7 +22,13 @@ import java.util.Map;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
+import javax.servlet.Servlet;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Properties;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.Service;
import org.apache.jackrabbit.api.security.user.Authorizable;
import org.apache.jackrabbit.api.security.user.Group;
import org.apache.jackrabbit.api.security.user.User;
@@ -30,13 +36,13 @@ import org.apache.jackrabbit.api.security.user.UserManager;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.servlets.HtmlResponse;
import org.apache.sling.commons.osgi.OsgiUtil;
-import org.apache.sling.servlets.post.impl.helper.RequestProperty;
import org.apache.sling.jackrabbit.usermanager.CreateUser;
import org.apache.sling.jackrabbit.usermanager.impl.resource.AuthorizableResourceProvider;
import org.apache.sling.jcr.api.SlingRepository;
import org.apache.sling.jcr.base.util.AccessControlUtil;
import org.apache.sling.servlets.post.Modification;
import org.apache.sling.servlets.post.SlingPostConstants;
+import org.apache.sling.servlets.post.impl.helper.RequestProperty;
import org.osgi.service.component.ComponentContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -79,16 +85,22 @@ import org.slf4j.LoggerFactory;
* <code>
* curl -F:name=ieb -Fpwd=password -FpwdConfirm=password -Fproperty1=value1 http://localhost:8080/system/userManager/user.create.html
* </code>
- *
- *
- * @scr.component immediate="true" label="%createUser.post.operation.name"
- * description="%createUser.post.operation.description"
- * @scr.service interface="javax.servlet.Servlet"
- * @scr.service interface="org.apache.sling.jackrabbit.usermanager.CreateUser"
- * @scr.property name="sling.servlet.resourceTypes" value="sling/users"
- * @scr.property name="sling.servlet.methods" value="POST"
- * @scr.property name="sling.servlet.selectors" value="create"
*/
+@Component (immediate=true, metatype=true, inherit=true,
+ label="%createUser.post.operation.name",
+ description="%createUser.post.operation.description")
+@Service(value={
+ Servlet.class,
+ CreateUser.class
+})
+@Properties ({
+ @Property (name="sling.servlet.resourceTypes",
+ value="sling/users"),
+ @Property (name="sling.servlet.methods",
+ value="POST"),
+ @Property (name="sling.servlet.selectors",
+ value="create")
+})
public class CreateUserServlet extends AbstractUserPostServlet implements CreateUser {
private static final long serialVersionUID = 6871481922737658675L;
@@ -97,51 +109,42 @@ public class CreateUserServlet extends AbstractUserPostServlet implements Create
*/
private final Logger log = LoggerFactory.getLogger(getClass());
- /**
- * @scr.property label="%self.registration.enabled.name"
- * description="%self.registration.enabled.description"
- * valueRef="DEFAULT_SELF_REGISTRATION_ENABLED"
- */
- private static final String PROP_SELF_REGISTRATION_ENABLED = "self.registration.enabled";
+ private static final boolean DEFAULT_SELF_REGISTRATION_ENABLED = false;
- private static final Boolean DEFAULT_SELF_REGISTRATION_ENABLED = Boolean.FALSE;
+ @Property (label="%self.registration.enabled.name",
+ description="%self.registration.enabled.description",
+ boolValue=DEFAULT_SELF_REGISTRATION_ENABLED)
+ private static final String PROP_SELF_REGISTRATION_ENABLED = "self.registration.enabled";
private Boolean selfRegistrationEnabled = DEFAULT_SELF_REGISTRATION_ENABLED;
/**
- * The name of the configuration parameter providing the
- * 'User administrator' group name.
- *
- * @scr.property valueRef="DEFAULT_USER_ADMIN_GROUP_NAME"
- */
- private static final String PAR_USER_ADMIN_GROUP_NAME = "user.admin.group.name";
-
- /**
* The default 'User administrator' group name
*
* @see #PAR_USER_ADMIN_GROUP_NAME
*/
private static final String DEFAULT_USER_ADMIN_GROUP_NAME = "UserAdmin";
+ /**
+ * The name of the configuration parameter providing the
+ * 'User administrator' group name.
+ */
+ @Property (value=DEFAULT_USER_ADMIN_GROUP_NAME)
+ private static final String PAR_USER_ADMIN_GROUP_NAME = "user.admin.group.name";
+
private String userAdminGroupName = DEFAULT_USER_ADMIN_GROUP_NAME;
/**
* The JCR Repository we access to resolve resources
- *
- * @scr.reference
*/
+ @Reference
private SlingRepository repository;
- /** Returns the JCR repository used by this service. */
- protected SlingRepository getRepository() {
- return repository;
- }
-
/**
* Returns an administrative session to the default workspace.
*/
private Session getSession() throws RepositoryException {
- return getRepository().loginAdministrative(null);
+ return repository.loginAdministrative(null);
}
/**
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/DeleteAuthorizableServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/DeleteAuthorizableServlet.java
index 171bf4e..baac910 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/DeleteAuthorizableServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/DeleteAuthorizableServlet.java
@@ -22,8 +22,13 @@ import java.util.NoSuchElementException;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
+import javax.servlet.Servlet;
import javax.servlet.http.HttpServletResponse;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Properties;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Service;
import org.apache.jackrabbit.api.security.user.Authorizable;
import org.apache.jackrabbit.api.security.user.Group;
import org.apache.jackrabbit.api.security.user.User;
@@ -74,19 +79,28 @@ import org.apache.sling.servlets.post.SlingPostConstants;
* <code>
* curl -Fgo=1 http://localhost:8080/system/userManager/user/ieb.delete.html
* </code>
- *
- *
- * @scr.component immediate="true" label="%deleteAuthorizable.post.operation.name"
- * description="%deleteAuthorizable.post.operation.description"
- * @scr.service interface="javax.servlet.Servlet"
- * @scr.service interface="org.apache.sling.jackrabbit.usermanager.DeleteUser"
- * @scr.service interface="org.apache.sling.jackrabbit.usermanager.DeleteGroup"
- * @scr.service interface="org.apache.sling.jackrabbit.usermanager.DeleteAuthorizables"
- * @scr.property name="sling.servlet.resourceTypes" values.0="sling/user"
- * values.1="sling/group" values.2="sling/userManager"
- * @scr.property name="sling.servlet.methods" value="POST"
- * @scr.property name="sling.servlet.selectors" value="delete"
*/
+@Component (immediate=true, metatype=true,
+ label="%deleteAuthorizable.post.operation.name",
+ description="%deleteAuthorizable.post.operation.description")
+@Service (value={
+ Servlet.class,
+ DeleteUser.class,
+ DeleteGroup.class,
+ DeleteAuthorizables.class
+})
+@Properties ({
+ @Property (name="sling.servlet.resourceTypes",
+ value={
+ "sling/user",
+ "sling/group",
+ "sling/userManager"
+ }),
+ @Property (name="sling.servlet.methods",
+ value="POST"),
+ @Property (name="sling.servlet.selectors",
+ value="delete")
+})
public class DeleteAuthorizableServlet extends AbstractPostServlet
implements DeleteUser, DeleteGroup, DeleteAuthorizables {
private static final long serialVersionUID = 5874621724096106496L;
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateGroupServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateGroupServlet.java
index eefa36c..1b28d09 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateGroupServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateGroupServlet.java
@@ -21,7 +21,13 @@ import java.util.Map;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
+import javax.servlet.Servlet;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Properties;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.Service;
import org.apache.jackrabbit.api.security.user.Authorizable;
import org.apache.jackrabbit.api.security.user.Group;
import org.apache.jackrabbit.api.security.user.UserManager;
@@ -75,20 +81,27 @@ import org.apache.sling.servlets.post.impl.helper.RequestProperty;
* <code>
* curl -Fprop1=value2 -Fproperty1=value1 http://localhost:8080/system/userManager/group/testGroup.update.html
* </code>
- *
- * @scr.component immediate="true" label="%updateGroup.post.operation.name"
- * description="%updateGroup.post.operation.description"
- * @scr.service interface="javax.servlet.Servlet"
- * @scr.service interface="org.apache.sling.jackrabbit.usermanager.UpdateGroup"
- * @scr.property name="sling.servlet.resourceTypes" values="sling/group"
- * @scr.property name="sling.servlet.methods" value="POST"
- * @scr.property name="sling.servlet.selectors" value="update"
*/
+@Component (immediate=true, metatype=true,
+ label="%updateGroup.post.operation.name",
+ description="%updateGroup.post.operation.description")
+@Service (value={
+ Servlet.class,
+ UpdateGroup.class
+})
+@Properties ({
+ @Property (name="sling.servlet.resourceTypes",
+ value="sling/group"),
+ @Property (name="sling.servlet.methods",
+ value="POST"),
+ @Property (name="sling.servlet.selectors",
+ value="update")
+})
public class UpdateGroupServlet extends AbstractGroupPostServlet
implements UpdateGroup {
private static final long serialVersionUID = -8292054361992488797L;
- /** @scr.reference */
+ @Reference
private JcrResourceResolverFactory resourceResolverFactory;
/*
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateUserServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateUserServlet.java
index cd9ac31..9e04782 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateUserServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateUserServlet.java
@@ -21,7 +21,12 @@ import java.util.Map;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
+import javax.servlet.Servlet;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Properties;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Service;
import org.apache.jackrabbit.api.security.user.Authorizable;
import org.apache.jackrabbit.api.security.user.User;
import org.apache.jackrabbit.api.security.user.UserManager;
@@ -72,17 +77,22 @@ import org.apache.sling.servlets.post.impl.helper.RequestProperty;
* <code>
* curl -Fprop1=value2 -Fproperty1=value1 http://localhost:8080/system/userManager/user/ieb.update.html
* </code>
- *
- *
- *
- * @scr.component immediate="true" label="%updateUser.post.operation.name"
- * description="%updateUser.post.operation.description"
- * @scr.service interface="javax.servlet.Servlet"
- * @scr.service interface="org.apache.sling.jackrabbit.usermanager.UpdateUser"
- * @scr.property name="sling.servlet.resourceTypes" value="sling/user"
- * @scr.property name="sling.servlet.methods" value="POST"
- * @scr.property name="sling.servlet.selectors" value="update"
*/
+@Component (immediate=true, metatype=true,
+ label="%updateUser.post.operation.name",
+ description="%updateUser.post.operation.description")
+@Service (value={
+ Servlet.class,
+ UpdateUser.class
+})
+@Properties ({
+ @Property (name="sling.servlet.resourceTypes",
+ value="sling/user"),
+ @Property (name="sling.servlet.methods",
+ value="POST"),
+ @Property (name="sling.servlet.selectors",
+ value="update")
+})
public class UpdateUserServlet extends AbstractUserPostServlet
implements UpdateUser {
private static final long serialVersionUID = 5874621724096106496L;
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableResourceProvider.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableResourceProvider.java
index f5a5192..cfe86b9 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableResourceProvider.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableResourceProvider.java
@@ -25,6 +25,10 @@ import javax.jcr.RepositoryException;
import javax.jcr.Session;
import javax.servlet.http.HttpServletRequest;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Properties;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Service;
import org.apache.jackrabbit.api.security.principal.PrincipalIterator;
import org.apache.jackrabbit.api.security.principal.PrincipalManager;
import org.apache.jackrabbit.api.security.user.Authorizable;
@@ -40,15 +44,19 @@ import org.slf4j.LoggerFactory;
/**
* Resource Provider implementation for jackrabbit UserManager resources.
- *
- * @scr.component immediate="true" label="%authorizable.resourceprovider.name"
- * description="%authorizable.resourceprovider.description"
- * @scr.property name="service.description"
- * value="Resource provider implementation for UserManager resources"
- * @scr.property name="service.vendor" value="The Apache Software Foundation"
- * @scr.property name="provider.roots" value="/system/userManager/"
- * @scr.service interface="org.apache.sling.api.resource.ResourceProvider"
*/
+@Component (immediate=true, metatype=true,
+ label="%authorizable.resourceprovider.name",
+ description="%authorizable.resourceprovider.description")
+@Service (value=ResourceProvider.class)
+@Properties ({
+ @Property (name="service.description",
+ value="Resource provider implementation for UserManager resources"),
+ @Property (name="service.vendor",
+ value="The Apache Software Foundation"),
+ @Property (name="provider.roots",
+ value="/system/userManager/")
+})
public class AuthorizableResourceProvider implements ResourceProvider {
/**
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-jackrabbit-usermanager] 26/33: align
code/javadoc
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit 38b3d0a35a637e6072c953d0b3e7f5cbb1662df0
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Tue Jun 17 04:22:25 2014 +0000
align code/javadoc
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@1603052 13f79535-47bb-0310-9956-ffa450edef68
---
.../impl/post/AbstractAuthorizablePostServlet.java | 53 +++++++++++-----------
1 file changed, 27 insertions(+), 26 deletions(-)
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractAuthorizablePostServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractAuthorizablePostServlet.java
index 96239be..8ccff33 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractAuthorizablePostServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractAuthorizablePostServlet.java
@@ -89,7 +89,7 @@ public abstract class AbstractAuthorizablePostServlet extends
* Collects the properties that form the content to be written back to the
* repository. NOTE: In the returned map, the key is the property name not a
* path.
- *
+ *
* @throws RepositoryException if a repository error occurs
* @throws ServletException if an internal error occurs
*/
@@ -129,7 +129,7 @@ public abstract class AbstractAuthorizablePostServlet extends
// be used.
continue; // skip it.
}
-
+
propPath = authorizablePath + "/" + propPath;
// @TypeHint example
@@ -230,7 +230,7 @@ public abstract class AbstractAuthorizablePostServlet extends
* Returns the request property for the given property path. If such a
* request property does not exist yet it is created and stored in the
* <code>props</code>.
- *
+ *
* @param props The map of already seen request properties.
* @param paramPath The absolute path of the property including the
* <code>suffix</code> to be looked up.
@@ -257,25 +257,25 @@ public abstract class AbstractAuthorizablePostServlet extends
/**
* Removes all properties listed as {@link RequestProperty#isDelete()} from
* the authorizable.
- *
+ *
* @param authorizable The
* <code>org.apache.jackrabbit.api.security.user.Authorizable</code>
* that should have properties deleted.
* @param reqProperties The map of request properties to check for
* properties to be removed.
- * @param response The <code>HtmlResponse</code> to be updated with
+ * @param changes The <code>List</code> to be updated with
* information on deleted properties.
* @throws RepositoryException Is thrown if an error occurrs checking or
* removing properties.
*/
- protected void processDeletes(Authorizable resource,
+ protected void processDeletes(Authorizable authorizable,
Map<String, RequestProperty> reqProperties,
List<Modification> changes) throws RepositoryException {
for (RequestProperty property : reqProperties.values()) {
if (property.isDelete()) {
- if (resource.hasProperty(property.getName())) {
- resource.removeProperty(property.getName());
+ if (authorizable.hasProperty(property.getName())) {
+ authorizable.removeProperty(property.getName());
changes.add(Modification.onDeleted(property.getPath()));
}
}
@@ -284,7 +284,7 @@ public abstract class AbstractAuthorizablePostServlet extends
/**
* Writes back the content
- *
+ *
* @throws RepositoryException if a repository error occurs
* @throws ServletException if an internal error occurs
*/
@@ -325,7 +325,7 @@ public abstract class AbstractAuthorizablePostServlet extends
/**
* set property without processing, except for type hints
- *
+ *
* @param parent the parent node
* @param prop the request property
* @throws RepositoryException if a repository error occurs.
@@ -454,19 +454,20 @@ public abstract class AbstractAuthorizablePostServlet extends
}
/**
- * Removes the property with the given name from the parent resource if it
+ * Removes the property with the given name from the authorizable if it
* exists.
- *
- * @param parent the parent resource
+ *
+ * @param authorizable the <code>org.apache.jackrabbit.api.security.user.Authorizable</code>
+ * that should have properties deleted.
* @param name the name of the property to remove
* @return path of the property that was removed or <code>null</code> if it
* was not removed
* @throws RepositoryException if a repository error occurs.
*/
- private boolean removePropertyIfExists(Authorizable resource, String name)
+ private boolean removePropertyIfExists(Authorizable authorizable, String name)
throws RepositoryException {
- if (resource.getProperty(name) != null) {
- resource.removeProperty(name);
+ if (authorizable.getProperty(name) != null) {
+ authorizable.removeProperty(name);
return true;
}
return false;
@@ -512,12 +513,12 @@ public abstract class AbstractAuthorizablePostServlet extends
return requirePrefix;
}
-
+
protected String convertToString(Object obj) {
if (obj == null) {
return null;
}
-
+
if (obj instanceof String) {
return (String)obj;
} else if (obj instanceof String[]) {
@@ -537,12 +538,12 @@ public abstract class AbstractAuthorizablePostServlet extends
}
return null;
}
-
+
protected String[] convertToStringArray(Object obj) {
if (obj == null) {
return null;
}
-
+
if (obj instanceof String) {
return new String[] {(String)obj};
} else if (obj instanceof String[]) {
@@ -564,10 +565,10 @@ public abstract class AbstractAuthorizablePostServlet extends
if (obj == null) {
return null;
}
-
+
if (obj instanceof String) {
return new RequestParameter[] {
- new RequestParameterImpl((String)obj, null)
+ new RequestParameterImpl((String)obj, null)
};
} else if (obj instanceof String[]) {
String [] strValues = (String[])obj;
@@ -583,7 +584,7 @@ public abstract class AbstractAuthorizablePostServlet extends
}
return null;
}
-
+
static class RequestParameterImpl implements RequestParameter {
private String value;
@@ -600,7 +601,7 @@ public abstract class AbstractAuthorizablePostServlet extends
String getEncoding() {
return this.encoding;
}
-
+
void setEncoding(String encoding) {
// recode this parameter by encoding the string with the current
// encoding and decode the bytes with the encoding
@@ -684,7 +685,7 @@ public abstract class AbstractAuthorizablePostServlet extends
return this.getString();
}
}
-
+
static class SlingUnsupportedEncodingException extends SlingIOException {
private static final long serialVersionUID = -4482276105859280247L;
@@ -694,5 +695,5 @@ public abstract class AbstractAuthorizablePostServlet extends
}
}
-
+
}
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-jackrabbit-usermanager] 09/33:
SLING-2480 : Add config for maven-sling-plugin to m2e configuration
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit e8733d7ce652c424e39b5f84d03adb723bd2895c
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed May 16 07:39:13 2012 +0000
SLING-2480 : Add config for maven-sling-plugin to m2e configuration
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@1339038 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 7066cee..41e84b1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>12</version>
+ <version>13-SNAPSHOT</version>
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-jackrabbit-usermanager] 17/33: Update
to latest parent pom and use latest releases in launchpad
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit b79048ad5a41d26a984eba69d784de1025fb514c
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon Feb 18 08:38:52 2013 +0000
Update to latest parent pom and use latest releases in launchpad
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@1447147 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 694d53a..c382755 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>14</version>
+ <version>15</version>
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-jackrabbit-usermanager] 33/33:
[maven-release-plugin] copy for tag
org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit 84278a97511148cb9835e9606bc02e35e12e5ff8
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Sep 16 14:33:45 2014 +0000
[maven-release-plugin] copy for tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
git-svn-id: https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.jcr.jackrabbit.usermanager-2.2.2@1625316 13f79535-47bb-0310-9956-ffa450edef68
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-jackrabbit-usermanager] 25/33: Update
to parent pom v19
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit f33d41d12df51327333b406af4eb8c8aa60035ea
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon Mar 31 14:39:20 2014 +0000
Update to parent pom v19
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@1583337 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 939d087..91a1c95 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>18</version>
+ <version>19</version>
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-jackrabbit-usermanager] 29/33: Clean up
usage of SCR annotations
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit 9e62caccae42fc2e6da7e39dd22f6354e4e4ab62
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Jul 29 12:21:59 2014 +0000
Clean up usage of SCR annotations
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@1614322 13f79535-47bb-0310-9956-ffa450edef68
---
.../impl/post/AbstractAuthorizablePostServlet.java | 14 +---
.../impl/post/AbstractUserPostServlet.java | 6 +-
.../impl/post/ChangeUserPasswordServlet.java | 19 +++++-
.../usermanager/impl/post/CreateUserServlet.java | 78 +++++++++++++---------
.../usermanager/impl/post/UpdateUserServlet.java | 43 ++++++++----
5 files changed, 99 insertions(+), 61 deletions(-)
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractAuthorizablePostServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractAuthorizablePostServlet.java
index 8ccff33..14f546f 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractAuthorizablePostServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractAuthorizablePostServlet.java
@@ -33,8 +33,6 @@ import javax.jcr.Value;
import javax.jcr.ValueFactory;
import javax.servlet.ServletException;
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Property;
import org.apache.jackrabbit.api.security.user.Authorizable;
import org.apache.sling.api.SlingIOException;
import org.apache.sling.api.request.RequestParameter;
@@ -49,20 +47,11 @@ import org.osgi.service.component.ComponentContext;
/**
* Base class for all the POST servlets for the UserManager operations
*/
-@Component (componentAbstract=true)
public abstract class AbstractAuthorizablePostServlet extends
AbstractPostServlet {
private static final long serialVersionUID = -5918670409789895333L;
- @Property (value={
- "EEE MMM dd yyyy HH:mm:ss 'GMT'Z",
- "yyyy-MM-dd'T'HH:mm:ss.SSSZ",
- "yyyy-MM-dd'T'HH:mm:ss",
- "yyyy-MM-dd",
- "dd.MM.yyyy HH:mm:ss",
- "dd.MM.yyyy"
- })
- private static final String PROP_DATE_FORMAT = "servlet.post.dateFormats";
+ public static final String PROP_DATE_FORMAT = "servlet.post.dateFormats";
private DateParser dateParser;
@@ -681,6 +670,7 @@ public abstract class AbstractAuthorizablePostServlet extends
return true;
}
+ @Override
public String toString() {
return this.getString();
}
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractUserPostServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractUserPostServlet.java
index 8d0d1e2..23ad715 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractUserPostServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractUserPostServlet.java
@@ -16,13 +16,11 @@
*/
package org.apache.sling.jackrabbit.usermanager.impl.post;
-import org.apache.felix.scr.annotations.Component;
import org.osgi.service.component.ComponentContext;
/**
* Base class for servlets manipulating users
*/
-@Component (componentAbstract=true)
public abstract class AbstractUserPostServlet extends
AbstractAuthorizablePostServlet {
@@ -30,10 +28,12 @@ public abstract class AbstractUserPostServlet extends
// ---------- SCR Integration ----------------------------------------------
- protected void activate(ComponentContext context) {
+ @Override
+ protected void activate(ComponentContext context) {
super.activate(context);
}
+ @Override
protected void deactivate(ComponentContext context) {
super.deactivate(context);
}
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java
index a27fe0c..7ca41a0 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java
@@ -84,7 +84,7 @@ import org.slf4j.LoggerFactory;
*
* <h4>Notes</h4>
*/
-@Component (immediate=true, metatype=true,
+@Component (metatype=true,
label="%changeUserPassword.post.operation.name",
description="%changeUserPassword.post.operation.description")
@Service (value={
@@ -97,7 +97,16 @@ import org.slf4j.LoggerFactory;
@Property (name="sling.servlet.methods",
value="POST"),
@Property (name="sling.servlet.selectors",
- value="changePassword")
+ value="changePassword"),
+ @Property (name=AbstractAuthorizablePostServlet.PROP_DATE_FORMAT,
+ value={
+ "EEE MMM dd yyyy HH:mm:ss 'GMT'Z",
+ "yyyy-MM-dd'T'HH:mm:ss.SSSZ",
+ "yyyy-MM-dd'T'HH:mm:ss",
+ "yyyy-MM-dd",
+ "dd.MM.yyyy HH:mm:ss",
+ "dd.MM.yyyy"
+ })
})
public class ChangeUserPasswordServlet extends AbstractUserPostServlet implements ChangeUserPassword {
private static final long serialVersionUID = 1923614318474654502L;
@@ -132,6 +141,7 @@ public class ChangeUserPasswordServlet extends AbstractUserPostServlet implement
* @param componentContext The OSGi <code>ComponentContext</code> of this
* component.
*/
+ @Override
protected void activate(ComponentContext componentContext) {
super.activate(componentContext);
Dictionary<?, ?> props = componentContext.getProperties();
@@ -141,6 +151,11 @@ public class ChangeUserPasswordServlet extends AbstractUserPostServlet implement
log.info("User Admin Group Name {}", this.userAdminGroupName);
}
+ @Override
+ protected void deactivate(ComponentContext context) {
+ super.deactivate(context);
+ }
+
/*
* (non-Javadoc)
* @see
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java
index 77721fd..5c6232d 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java
@@ -34,7 +34,6 @@ import org.apache.jackrabbit.api.security.user.Group;
import org.apache.jackrabbit.api.security.user.User;
import org.apache.jackrabbit.api.security.user.UserManager;
import org.apache.sling.api.SlingHttpServletRequest;
-import org.apache.sling.api.servlets.HtmlResponse;
import org.apache.sling.commons.osgi.OsgiUtil;
import org.apache.sling.jackrabbit.usermanager.CreateUser;
import org.apache.sling.jackrabbit.usermanager.impl.resource.AuthorizableResourceProvider;
@@ -88,20 +87,29 @@ import org.slf4j.LoggerFactory;
* curl -F:name=ieb -Fpwd=password -FpwdConfirm=password -Fproperty1=value1 http://localhost:8080/system/userManager/user.create.html
* </code>
*/
-@Component (immediate=true, metatype=true, inherit=true,
+@Component (metatype=true,
label="%createUser.post.operation.name",
description="%createUser.post.operation.description")
@Service(value={
Servlet.class,
CreateUser.class
-})
+})
@Properties ({
@Property (name="sling.servlet.resourceTypes",
value="sling/users"),
@Property (name="sling.servlet.methods",
value="POST"),
@Property (name="sling.servlet.selectors",
- value="create")
+ value="create"),
+ @Property (name=AbstractAuthorizablePostServlet.PROP_DATE_FORMAT,
+ value={
+ "EEE MMM dd yyyy HH:mm:ss 'GMT'Z",
+ "yyyy-MM-dd'T'HH:mm:ss.SSSZ",
+ "yyyy-MM-dd'T'HH:mm:ss",
+ "yyyy-MM-dd",
+ "dd.MM.yyyy HH:mm:ss",
+ "dd.MM.yyyy"
+ })
})
public class CreateUserServlet extends AbstractUserPostServlet implements CreateUser {
private static final long serialVersionUID = 6871481922737658675L;
@@ -126,16 +134,16 @@ public class CreateUserServlet extends AbstractUserPostServlet implements Create
* @see #PAR_USER_ADMIN_GROUP_NAME
*/
private static final String DEFAULT_USER_ADMIN_GROUP_NAME = "UserAdmin";
-
+
/**
- * The name of the configuration parameter providing the
+ * The name of the configuration parameter providing the
* 'User administrator' group name.
*/
@Property (value=DEFAULT_USER_ADMIN_GROUP_NAME)
private static final String PAR_USER_ADMIN_GROUP_NAME = "user.admin.group.name";
private String userAdminGroupName = DEFAULT_USER_ADMIN_GROUP_NAME;
-
+
/**
* The JCR Repository we access to resolve resources
*/
@@ -170,6 +178,7 @@ public class CreateUserServlet extends AbstractUserPostServlet implements Create
* @param componentContext The OSGi <code>ComponentContext</code> of this
* component.
*/
+ @Override
protected void activate(ComponentContext componentContext) {
super.activate(componentContext);
Dictionary<?, ?> props = componentContext.getProperties();
@@ -181,12 +190,17 @@ public class CreateUserServlet extends AbstractUserPostServlet implements Create
} else {
selfRegistrationEnabled = DEFAULT_SELF_REGISTRATION_ENABLED;
}
-
+
this.userAdminGroupName = OsgiUtil.toString(props.get(PAR_USER_ADMIN_GROUP_NAME),
DEFAULT_USER_ADMIN_GROUP_NAME);
log.info("User Admin Group Name {}", this.userAdminGroupName);
}
+ @Override
+ protected void deactivate(ComponentContext context) {
+ super.deactivate(context);
+ }
+
/*
* (non-Javadoc)
* @see
@@ -198,17 +212,17 @@ public class CreateUserServlet extends AbstractUserPostServlet implements Create
protected void handleOperation(SlingHttpServletRequest request,
AbstractPostResponse response, List<Modification> changes)
throws RepositoryException {
-
+
Session session = request.getResourceResolver().adaptTo(Session.class);
String principalName = request.getParameter(SlingPostConstants.RP_NODE_NAME);
- User user = createUser(session,
- principalName,
+ User user = createUser(session,
+ principalName,
request.getParameter("pwd"),
request.getParameter("pwdConfirm"),
- request.getRequestParameterMap(),
+ request.getRequestParameterMap(),
changes);
-
+
String userPath = null;
if (user == null) {
if (changes.size() > 0) {
@@ -221,7 +235,7 @@ public class CreateUserServlet extends AbstractUserPostServlet implements Create
userPath = AuthorizableResourceProvider.SYSTEM_USER_MANAGER_USER_PREFIX
+ user.getID();
}
-
+
if (userPath != null) {
response.setPath(userPath);
response.setLocation(externalizePath(request, userPath));
@@ -229,18 +243,18 @@ public class CreateUserServlet extends AbstractUserPostServlet implements Create
response.setParentLocation(externalizePath(request,
AuthorizableResourceProvider.SYSTEM_USER_MANAGER_USER_PATH));
}
-
+
/* (non-Javadoc)
* @see org.apache.sling.jackrabbit.usermanager.CreateUser#createUser(javax.jcr.Session, java.lang.String, java.lang.String, java.lang.String, java.util.Map, java.util.List)
*/
- public User createUser(Session jcrSession,
- String name,
+ public User createUser(Session jcrSession,
+ String name,
String password,
- String passwordConfirm,
+ String passwordConfirm,
Map<String, ?> properties,
- List<Modification> changes)
+ List<Modification> changes)
throws RepositoryException {
-
+
if (jcrSession == null) {
throw new RepositoryException("JCR Session not found");
}
@@ -251,7 +265,7 @@ public class CreateUserServlet extends AbstractUserPostServlet implements Create
UserManager um = AccessControlUtil.getUserManager(jcrSession);
User currentUser = (User) um.getAuthorizable(jcrSession.getUserID());
administrator = currentUser.isAdmin();
-
+
if (!administrator) {
//check if the user is a member of the 'User administrator' group
Authorizable userAdmin = um.getAuthorizable(this.userAdminGroupName);
@@ -261,14 +275,14 @@ public class CreateUserServlet extends AbstractUserPostServlet implements Create
administrator = true;
}
}
-
+
}
} catch ( Exception ex ) {
log.warn("Failed to determine if the user is an admin, assuming not. Cause: "+ex.getMessage());
administrator = false;
}
-
-
+
+
// make sure user self-registration is enabled
if (!administrator && !selfRegistrationEnabled) {
throw new RepositoryException(
@@ -287,7 +301,7 @@ public class CreateUserServlet extends AbstractUserPostServlet implements Create
throw new RepositoryException(
"Password value does not match the confirmation password");
}
-
+
User user = null;
Session selfRegSession = jcrSession;
boolean useAdminSession = !administrator && selfRegistrationEnabled;
@@ -297,7 +311,7 @@ public class CreateUserServlet extends AbstractUserPostServlet implements Create
// but self-registration is enabled, so use an admin session
// to do the work.
selfRegSession = getSession();
- }
+ }
UserManager userManager = AccessControlUtil.getUserManager(selfRegSession);
Authorizable authorizable = userManager.getAuthorizable(name);
@@ -311,7 +325,7 @@ public class CreateUserServlet extends AbstractUserPostServlet implements Create
user = userManager.createUser(name, password);
String userPath = AuthorizableResourceProvider.SYSTEM_USER_MANAGER_USER_PREFIX
+ user.getID();
-
+
Map<String, RequestProperty> reqProperties = collectContent(
properties, userPath);
@@ -323,7 +337,7 @@ public class CreateUserServlet extends AbstractUserPostServlet implements Create
if (selfRegSession.hasPendingChanges()) {
selfRegSession.save();
}
-
+
if (useAdminSession) {
//lookup the user from the user session so we can return a live object
UserManager userManager2 = AccessControlUtil.getUserManager(jcrSession);
@@ -333,16 +347,16 @@ public class CreateUserServlet extends AbstractUserPostServlet implements Create
} else {
user = null;
}
- }
+ }
}
} finally {
if (useAdminSession) {
//done with the self-reg admin session, so clean it up
ungetSession(selfRegSession);
- }
+ }
}
-
+
return user;
}
-
+
}
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateUserServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateUserServlet.java
index f26eab0..c61b40d 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateUserServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateUserServlet.java
@@ -33,13 +33,13 @@ import org.apache.jackrabbit.api.security.user.UserManager;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.api.resource.ResourceNotFoundException;
-import org.apache.sling.api.servlets.HtmlResponse;
import org.apache.sling.jackrabbit.usermanager.UpdateUser;
import org.apache.sling.jackrabbit.usermanager.impl.resource.AuthorizableResourceProvider;
import org.apache.sling.jcr.base.util.AccessControlUtil;
import org.apache.sling.servlets.post.AbstractPostResponse;
import org.apache.sling.servlets.post.Modification;
import org.apache.sling.servlets.post.impl.helper.RequestProperty;
+import org.osgi.service.component.ComponentContext;
/**
* <p>
@@ -74,30 +74,49 @@ import org.apache.sling.servlets.post.impl.helper.RequestProperty;
* <dd>Failure</dd>
* </dl>
* <h4>Example</h4>
- *
+ *
* <code>
* curl -Fprop1=value2 -Fproperty1=value1 http://localhost:8080/system/userManager/user/ieb.update.html
* </code>
*/
-@Component (immediate=true, metatype=true,
+@Component (metatype=true,
label="%updateUser.post.operation.name",
description="%updateUser.post.operation.description")
@Service (value={
Servlet.class,
UpdateUser.class
-})
+})
@Properties ({
@Property (name="sling.servlet.resourceTypes",
value="sling/user"),
@Property (name="sling.servlet.methods",
value="POST"),
@Property (name="sling.servlet.selectors",
- value="update")
+ value="update"),
+ @Property (name=AbstractAuthorizablePostServlet.PROP_DATE_FORMAT,
+ value={
+ "EEE MMM dd yyyy HH:mm:ss 'GMT'Z",
+ "yyyy-MM-dd'T'HH:mm:ss.SSSZ",
+ "yyyy-MM-dd'T'HH:mm:ss",
+ "yyyy-MM-dd",
+ "dd.MM.yyyy HH:mm:ss",
+ "dd.MM.yyyy"
+ })
})
-public class UpdateUserServlet extends AbstractUserPostServlet
+public class UpdateUserServlet extends AbstractUserPostServlet
implements UpdateUser {
private static final long serialVersionUID = 5874621724096106496L;
+ @Override
+ protected void activate(ComponentContext context) {
+ super.activate(context);
+ }
+
+ @Override
+ protected void deactivate(ComponentContext context) {
+ super.deactivate(context);
+ }
+
/*
* (non-Javadoc)
* @see
@@ -113,17 +132,17 @@ public class UpdateUserServlet extends AbstractUserPostServlet
Session session = request.getResourceResolver().adaptTo(Session.class);
updateUser(session,
resource.getName(),
- request.getRequestParameterMap(),
+ request.getRequestParameterMap(),
changes);
}
-
+
/* (non-Javadoc)
* @see org.apache.sling.jackrabbit.usermanager.UpdateUser#updateUser(javax.jcr.Session, java.lang.String, java.util.Map, java.util.List)
*/
public User updateUser(Session jcrSession, String name,
Map<String, ?> properties, List<Modification> changes)
throws RepositoryException {
-
+
User user;
UserManager userManager = AccessControlUtil.getUserManager(jcrSession);
Authorizable authorizable = userManager.getAuthorizable(name);
@@ -133,7 +152,7 @@ public class UpdateUserServlet extends AbstractUserPostServlet
throw new ResourceNotFoundException(
"User to update could not be determined");
}
-
+
String userPath = AuthorizableResourceProvider.SYSTEM_USER_MANAGER_GROUP_PREFIX
+ user.getID();
@@ -144,7 +163,7 @@ public class UpdateUserServlet extends AbstractUserPostServlet
// write content from form
writeContent(jcrSession, user, reqProperties, changes);
-
+
//SLING-2072 set the user as enabled or disabled if the request
// has supplied the relevant properties
String disabledParam = convertToString(properties.get(":disabled"));
@@ -163,5 +182,5 @@ public class UpdateUserServlet extends AbstractUserPostServlet
throw new RepositoryException("Failed to update user.", re);
}
return user;
- }
+ }
}
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-jackrabbit-usermanager] 27/33:
style/cleanup
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit 3528bfb638f0398eba5f96eb1e03cdec85865ea6
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Sat Jul 5 09:49:16 2014 +0000
style/cleanup
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@1607990 13f79535-47bb-0310-9956-ffa450edef68
---
.../impl/post/ChangeUserPasswordServlet.java | 49 +++++++++++-----------
1 file changed, 24 insertions(+), 25 deletions(-)
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java
index ec31e00..756a887 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java
@@ -37,7 +37,6 @@ import org.apache.jackrabbit.api.security.user.UserManager;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.api.resource.ResourceNotFoundException;
-import org.apache.sling.api.servlets.HtmlResponse;
import org.apache.sling.commons.osgi.OsgiUtil;
import org.apache.sling.jackrabbit.usermanager.ChangeUserPassword;
import org.apache.sling.jackrabbit.usermanager.impl.resource.AuthorizableResourceProvider;
@@ -91,7 +90,7 @@ import org.slf4j.LoggerFactory;
@Service (value={
Servlet.class,
ChangeUserPassword.class
-})
+})
@Properties ({
@Property (name="sling.servlet.resourceTypes",
value="sling/user"),
@@ -114,9 +113,9 @@ public class ChangeUserPasswordServlet extends AbstractUserPostServlet implement
* @see #PAR_USER_ADMIN_GROUP_NAME
*/
private static final String DEFAULT_USER_ADMIN_GROUP_NAME = "UserAdmin";
-
+
/**
- * The name of the configuration parameter providing the
+ * The name of the configuration parameter providing the
* name of the group whose members are allowed to reset the password
* of a user without the 'oldPwd' value.
*/
@@ -124,7 +123,7 @@ public class ChangeUserPasswordServlet extends AbstractUserPostServlet implement
private static final String PAR_USER_ADMIN_GROUP_NAME = "user.admin.group.name";
private String userAdminGroupName = DEFAULT_USER_ADMIN_GROUP_NAME;
-
+
// ---------- SCR integration ---------------------------------------------
/**
@@ -136,12 +135,12 @@ public class ChangeUserPasswordServlet extends AbstractUserPostServlet implement
protected void activate(ComponentContext componentContext) {
super.activate(componentContext);
Dictionary<?, ?> props = componentContext.getProperties();
-
+
this.userAdminGroupName = OsgiUtil.toString(props.get(PAR_USER_ADMIN_GROUP_NAME),
DEFAULT_USER_ADMIN_GROUP_NAME);
log.info("User Admin Group Name {}", this.userAdminGroupName);
}
-
+
/*
* (non-Javadoc)
* @see
@@ -153,33 +152,33 @@ public class ChangeUserPasswordServlet extends AbstractUserPostServlet implement
protected void handleOperation(SlingHttpServletRequest request,
AbstractPostResponse response, List<Modification> changes)
throws RepositoryException {
-
+
Resource resource = request.getResource();
Session session = request.getResourceResolver().adaptTo(Session.class);
- changePassword(session,
- resource.getName(),
- request.getParameter("oldPwd"),
- request.getParameter("newPwd"),
- request.getParameter("newPwdConfirm"),
+ changePassword(session,
+ resource.getName(),
+ request.getParameter("oldPwd"),
+ request.getParameter("newPwd"),
+ request.getParameter("newPwdConfirm"),
changes);
}
-
+
/* (non-Javadoc)
* @see org.apache.sling.jackrabbit.usermanager.ChangeUserPassword#changePassword(javax.jcr.Session, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.List)
*/
- public User changePassword(Session jcrSession,
+ public User changePassword(Session jcrSession,
String name,
- String oldPassword,
- String newPassword,
+ String oldPassword,
+ String newPassword,
String newPasswordConfirm,
- List<Modification> changes)
+ List<Modification> changes)
throws RepositoryException {
-
+
if ("anonymous".equals(name)) {
throw new RepositoryException(
"Can not change the password of the anonymous user.");
}
-
+
User user;
UserManager userManager = AccessControlUtil.getUserManager(jcrSession);
Authorizable authorizable = userManager.getAuthorizable(name);
@@ -189,7 +188,7 @@ public class ChangeUserPasswordServlet extends AbstractUserPostServlet implement
throw new ResourceNotFoundException(
"User to update could not be determined");
}
-
+
//SLING-2069: if the current user is an administrator, then a missing oldPwd is ok,
// otherwise the oldPwd must be supplied.
boolean administrator = false;
@@ -200,7 +199,7 @@ public class ChangeUserPasswordServlet extends AbstractUserPostServlet implement
UserManager um = AccessControlUtil.getUserManager(jcrSession);
User currentUser = (User) um.getAuthorizable(jcrSession.getUserID());
administrator = currentUser.isAdmin();
-
+
if (!administrator) {
//check if the user is a member of the 'User administrator' group
Authorizable userAdmin = um.getAuthorizable(this.userAdminGroupName);
@@ -210,7 +209,7 @@ public class ChangeUserPasswordServlet extends AbstractUserPostServlet implement
administrator = true;
}
}
-
+
}
} catch ( Exception ex ) {
log.warn("Failed to determine if the user is an admin, assuming not. Cause: "+ex.getMessage());
@@ -244,10 +243,10 @@ public class ChangeUserPasswordServlet extends AbstractUserPostServlet implement
} catch (RepositoryException re) {
throw new RepositoryException("Failed to change user password.", re);
}
-
+
return user;
}
-
+
private void checkPassword(Authorizable authorizable, String oldPassword)
throws RepositoryException {
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-jackrabbit-usermanager] 11/33:
SLING-2465 Applied patch from Eric to set user path when creating a user
that the creator can't 'see'
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit 08089b25e108c1af0bde209b3cb92b0ceab09886
Author: Carl Franklin Hall <th...@apache.org>
AuthorDate: Thu Jun 7 23:04:43 2012 +0000
SLING-2465 Applied patch from Eric to set user path when creating a user that the creator can't 'see'
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@1347825 13f79535-47bb-0310-9956-ffa450edef68
---
.../usermanager/impl/post/CreateUserServlet.java | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java
index 638bcbd..df280ed 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java
@@ -41,6 +41,7 @@ import org.apache.sling.jackrabbit.usermanager.impl.resource.AuthorizableResourc
import org.apache.sling.jcr.api.SlingRepository;
import org.apache.sling.jcr.base.util.AccessControlUtil;
import org.apache.sling.servlets.post.Modification;
+import org.apache.sling.servlets.post.ModificationType;
import org.apache.sling.servlets.post.SlingPostConstants;
import org.apache.sling.servlets.post.impl.helper.RequestProperty;
import org.osgi.service.component.ComponentContext;
@@ -207,10 +208,23 @@ public class CreateUserServlet extends AbstractUserPostServlet implements Create
request.getRequestParameterMap(),
changes);
- String userPath = AuthorizableResourceProvider.SYSTEM_USER_MANAGER_USER_PREFIX
- + user.getID();
- response.setPath(userPath);
- response.setLocation(externalizePath(request, userPath));
+ String userPath = null;
+ if (user == null) {
+ if (changes.size() > 0) {
+ Modification modification = changes.get(0);
+ if (modification.getType() == ModificationType.CREATE) {
+ userPath = modification.getSource();
+ }
+ }
+ } else {
+ userPath = AuthorizableResourceProvider.SYSTEM_USER_MANAGER_USER_PREFIX
+ + user.getID();
+ }
+
+ if (userPath != null) {
+ response.setPath(userPath);
+ response.setLocation(externalizePath(request, userPath));
+ }
response.setParentLocation(externalizePath(request,
AuthorizableResourceProvider.SYSTEM_USER_MANAGER_USER_PATH));
}
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-jackrabbit-usermanager] 14/33: Use
released versions
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit 82f2e132e4bed153567584d7b25e476dc81b7167
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Jul 10 11:07:18 2012 +0000
Use released versions
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@1359601 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 35a2fff..816c0dc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>14-SNAPSHOT</version>
+ <version>13</version>
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-jackrabbit-usermanager] 22/33:
SLING-2944 Revert Sling API dependency to 2.2.0 again
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit 5a5f0deb7ffbaf12c0aa942893dab6ba9b918dd4
Author: Felix Meschberger <fm...@apache.org>
AuthorDate: Mon Aug 5 15:28:17 2013 +0000
SLING-2944 Revert Sling API dependency to 2.2.0 again
Sling API 2.4.0 is not required and probably only has been
updated to make sure the import version range for the Resource
API is correct. Given SLING-2993 we should actually provide
proper annotation of implemented API for the bundle plugin
to properly devise the import version range.
For now removing the 'provide:=true' import tag solves this
issue, since we only implement the ResourceProvider interface
(intended to be @ConsumerType) and extend AbstractSlingResource
(which is safe to extend in @ConsumerType fashion).
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@1510567 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 6 +-----
.../jackrabbit/usermanager/impl/resource/AuthorizableResource.java | 2 +-
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/pom.xml b/pom.xml
index c32d1a6..9710b86 100644
--- a/pom.xml
+++ b/pom.xml
@@ -74,10 +74,6 @@
<extensions>true</extensions>
<configuration>
<instructions>
- <Import-Package>
- org.apache.sling.api.resource;provide:=true,
- *
- </Import-Package>
<Export-Package>
org.apache.sling.jackrabbit.usermanager;version=2.2.1,
</Export-Package>
@@ -103,7 +99,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.api</artifactId>
- <version>2.4.0</version>
+ <version>2.2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableResource.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableResource.java
index fad6c38..8f1c5f2 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableResource.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableResource.java
@@ -39,7 +39,7 @@ import org.apache.sling.api.resource.ValueMap;
@Adapter(condition="If the resource is an AuthorizableResource and represents a JCR User", value = User.class),
@Adapter(condition="If the resource is an AuthorizableResource and represents a JCR Group", value = Group.class)
})
-public class AuthorizableResource extends AbstractResource implements Resource {
+public class AuthorizableResource extends AbstractResource {
private Authorizable authorizable = null;
private ResourceResolver resourceResolver = null;
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-jackrabbit-usermanager] 16/33: Use
latest releases and update to new parent pom
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit 28f6568ff8bdf915ffa531286a945d7da11e7efb
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Sun Dec 23 06:53:35 2012 +0000
Use latest releases and update to new parent pom
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@1425425 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 866a590..694d53a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>13</version>
+ <version>14</version>
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-jackrabbit-usermanager] 32/33:
[maven-release-plugin] prepare release
org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit a1aff8749c81cad911a31ce9cd04a33af9662341
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Sep 16 14:33:02 2014 +0000
[maven-release-plugin] prepare release org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@1625315 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index a918b5a..df8d049 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
<artifactId>org.apache.sling.jcr.jackrabbit.usermanager</artifactId>
<packaging>bundle</packaging>
- <version>2.2.1-SNAPSHOT</version>
+ <version>2.2.2</version>
<name>Apache Sling Jackrabbit UserManager Support</name>
<description>
Provides ResourceProvider and SlingPostOperations for the Jackrabbit
@@ -38,13 +38,13 @@
<scm>
<connection>
- scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager
+ scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
</connection>
<developerConnection>
- scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager
+ scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
</developerConnection>
<url>
- http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/jackrabbit-usermanager
+ http://svn.apache.org/viewvc/sling/tags/org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
</url>
</scm>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-jackrabbit-usermanager] 15/33:
SLING-2644 - Make the jackrabbit/accessmanager and jackrabbit/usermanager
to work with newer servlets/post bundle
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit 78c3704a24e0348e1ac06c332f271ef21e546715
Author: Mike Müller <my...@apache.org>
AuthorDate: Tue Dec 11 14:57:03 2012 +0000
SLING-2644 - Make the jackrabbit/accessmanager and jackrabbit/usermanager to work with newer servlets/post bundle
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@1420206 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 4 +-
.../usermanager/impl/post/AbstractPostServlet.java | 47 +++++++++++-----------
.../impl/post/ChangeUserPasswordServlet.java | 3 +-
.../usermanager/impl/post/CreateGroupServlet.java | 3 +-
.../usermanager/impl/post/CreateUserServlet.java | 3 +-
.../impl/post/DeleteAuthorizableServlet.java | 5 ++-
.../usermanager/impl/post/UpdateGroupServlet.java | 3 +-
.../usermanager/impl/post/UpdateUserServlet.java | 3 +-
8 files changed, 39 insertions(+), 32 deletions(-)
diff --git a/pom.xml b/pom.xml
index 816c0dc..866a590 100644
--- a/pom.xml
+++ b/pom.xml
@@ -75,7 +75,7 @@
<configuration>
<instructions>
<Export-Package>
- org.apache.sling.jackrabbit.usermanager;version=2.2.0,
+ org.apache.sling.jackrabbit.usermanager;version=2.2.1,
</Export-Package>
<Private-Package>
org.apache.sling.jackrabbit.usermanager.impl.*
@@ -105,7 +105,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.servlets.post</artifactId>
- <version>2.1.0</version>
+ <version>2.1.2</version>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractPostServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractPostServlet.java
index fec6cae..5057628 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractPostServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractPostServlet.java
@@ -30,12 +30,13 @@ import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.SlingHttpServletResponse;
import org.apache.sling.api.resource.ResourceNotFoundException;
import org.apache.sling.api.resource.ResourceUtil;
-import org.apache.sling.api.servlets.HtmlResponse;
+import org.apache.sling.servlets.post.HtmlResponse;
import org.apache.sling.api.servlets.SlingAllMethodsServlet;
import org.apache.sling.api.wrappers.SlingRequestPaths;
+import org.apache.sling.servlets.post.AbstractPostResponse;
import org.apache.sling.servlets.post.Modification;
import org.apache.sling.servlets.post.SlingPostConstants;
-import org.apache.sling.servlets.post.impl.helper.JSONResponse;
+import org.apache.sling.servlets.post.JSONResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -64,20 +65,20 @@ public abstract class AbstractPostServlet extends
SlingHttpServletResponse httpResponse) throws ServletException,
IOException {
// prepare the response
- HtmlResponse htmlResponse = createHtmlResponse(request);
- htmlResponse.setReferer(request.getHeader("referer"));
+ AbstractPostResponse response = createHtmlResponse(request);
+ response.setReferer(request.getHeader("referer"));
// calculate the paths
String path = getItemPath(request);
- htmlResponse.setPath(path);
+ response.setPath(path);
// location
- htmlResponse.setLocation(externalizePath(request, path));
+ response.setLocation(externalizePath(request, path));
// parent location
path = ResourceUtil.getParent(path);
if (path != null) {
- htmlResponse.setParentLocation(externalizePath(request, path));
+ response.setParentLocation(externalizePath(request, path));
}
Session session = request.getResourceResolver().adaptTo(Session.class);
@@ -85,7 +86,7 @@ public abstract class AbstractPostServlet extends
final List<Modification> changes = new ArrayList<Modification>();
try {
- handleOperation(request, htmlResponse, changes);
+ handleOperation(request, response, changes);
// TODO: maybe handle SlingAuthorizablePostProcessor handlers here
@@ -93,24 +94,24 @@ public abstract class AbstractPostServlet extends
for (Modification change : changes) {
switch (change.getType()) {
case MODIFY:
- htmlResponse.onModified(change.getSource());
+ response.onModified(change.getSource());
break;
case DELETE:
- htmlResponse.onDeleted(change.getSource());
+ response.onDeleted(change.getSource());
break;
case MOVE:
- htmlResponse.onMoved(change.getSource(),
+ response.onMoved(change.getSource(),
change.getDestination());
break;
case COPY:
- htmlResponse.onCopied(change.getSource(),
+ response.onCopied(change.getSource(),
change.getDestination());
break;
case CREATE:
- htmlResponse.onCreated(change.getSource());
+ response.onCreated(change.getSource());
break;
case ORDER:
- htmlResponse.onChange("ordered", change.getSource(),
+ response.onChange("ordered", change.getSource(),
change.getDestination());
break;
}
@@ -120,13 +121,13 @@ public abstract class AbstractPostServlet extends
session.save();
}
} catch (ResourceNotFoundException rnfe) {
- htmlResponse.setStatus(HttpServletResponse.SC_NOT_FOUND,
+ response.setStatus(HttpServletResponse.SC_NOT_FOUND,
rnfe.getMessage());
} catch (Throwable throwable) {
log.debug("Exception while handling POST "
+ request.getResource().getPath() + " with "
+ getClass().getName(), throwable);
- htmlResponse.setError(throwable);
+ response.setError(throwable);
} finally {
try {
if (session.hasPendingChanges()) {
@@ -139,8 +140,8 @@ public abstract class AbstractPostServlet extends
}
// check for redirect URL if processing succeeded
- if (htmlResponse.isSuccessful()) {
- String redirect = getRedirectUrl(request, htmlResponse);
+ if (response.isSuccessful()) {
+ String redirect = getRedirectUrl(request, response);
if (redirect != null) {
httpResponse.sendRedirect(redirect);
return;
@@ -148,7 +149,7 @@ public abstract class AbstractPostServlet extends
}
// create a html response and send if unsuccessful or no redirect
- htmlResponse.send(httpResponse, isSetStatus(request));
+ response.send(httpResponse, isSetStatus(request));
}
/**
@@ -160,7 +161,7 @@ public abstract class AbstractPostServlet extends
* </ul>
* or a {@link org.apache.sling.api.servlets.HtmlResponse} otherwise
*/
- protected HtmlResponse createHtmlResponse(SlingHttpServletRequest req) {
+ protected AbstractPostResponse createHtmlResponse(SlingHttpServletRequest req) {
if (JSONResponse.RESPONSE_CONTENT_TYPE.equals(req.getResponseContentType())) {
return new JSONResponse();
} else {
@@ -172,11 +173,11 @@ public abstract class AbstractPostServlet extends
* Extending Servlet should implement this operation to do the work
*
* @param request the sling http request to process
- * @param htmlResponse the response
+ * @param response the response
* @param changes
*/
abstract protected void handleOperation(SlingHttpServletRequest request,
- HtmlResponse htmlResponse, List<Modification> changes)
+ AbstractPostResponse response, List<Modification> changes)
throws RepositoryException;
/**
@@ -185,7 +186,7 @@ public abstract class AbstractPostServlet extends
* @param ctx the post processor
* @return the redirect location or <code>null</code>
*/
- protected String getRedirectUrl(HttpServletRequest request, HtmlResponse ctx) {
+ protected String getRedirectUrl(HttpServletRequest request, AbstractPostResponse ctx) {
// redirect param has priority (but see below, magic star)
String result = request.getParameter(SlingPostConstants.RP_REDIRECT_TO);
if (result != null && ctx.getPath() != null) {
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java
index 1f18201..ec31e00 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java
@@ -42,6 +42,7 @@ import org.apache.sling.commons.osgi.OsgiUtil;
import org.apache.sling.jackrabbit.usermanager.ChangeUserPassword;
import org.apache.sling.jackrabbit.usermanager.impl.resource.AuthorizableResourceProvider;
import org.apache.sling.jcr.base.util.AccessControlUtil;
+import org.apache.sling.servlets.post.AbstractPostResponse;
import org.apache.sling.servlets.post.Modification;
import org.osgi.service.component.ComponentContext;
import org.slf4j.Logger;
@@ -150,7 +151,7 @@ public class ChangeUserPasswordServlet extends AbstractUserPostServlet implement
*/
@Override
protected void handleOperation(SlingHttpServletRequest request,
- HtmlResponse htmlResponse, List<Modification> changes)
+ AbstractPostResponse response, List<Modification> changes)
throws RepositoryException {
Resource resource = request.getResource();
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateGroupServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateGroupServlet.java
index 9ffe6b0..5b38101 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateGroupServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateGroupServlet.java
@@ -40,6 +40,7 @@ import org.apache.sling.jackrabbit.usermanager.CreateGroup;
import org.apache.sling.jackrabbit.usermanager.impl.resource.AuthorizableResourceProvider;
import org.apache.sling.jcr.base.util.AccessControlUtil;
import org.apache.sling.jcr.resource.JcrResourceResolverFactory;
+import org.apache.sling.servlets.post.AbstractPostResponse;
import org.apache.sling.servlets.post.Modification;
import org.apache.sling.servlets.post.SlingPostConstants;
import org.apache.sling.servlets.post.impl.helper.RequestProperty;
@@ -112,7 +113,7 @@ public class CreateGroupServlet extends AbstractGroupPostServlet implements Crea
*/
@Override
protected void handleOperation(SlingHttpServletRequest request,
- HtmlResponse response, List<Modification> changes)
+ AbstractPostResponse response, List<Modification> changes)
throws RepositoryException {
Session session = request.getResourceResolver().adaptTo(Session.class);
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java
index df280ed..77721fd 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java
@@ -40,6 +40,7 @@ import org.apache.sling.jackrabbit.usermanager.CreateUser;
import org.apache.sling.jackrabbit.usermanager.impl.resource.AuthorizableResourceProvider;
import org.apache.sling.jcr.api.SlingRepository;
import org.apache.sling.jcr.base.util.AccessControlUtil;
+import org.apache.sling.servlets.post.AbstractPostResponse;
import org.apache.sling.servlets.post.Modification;
import org.apache.sling.servlets.post.ModificationType;
import org.apache.sling.servlets.post.SlingPostConstants;
@@ -195,7 +196,7 @@ public class CreateUserServlet extends AbstractUserPostServlet implements Create
*/
@Override
protected void handleOperation(SlingHttpServletRequest request,
- HtmlResponse response, List<Modification> changes)
+ AbstractPostResponse response, List<Modification> changes)
throws RepositoryException {
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/DeleteAuthorizableServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/DeleteAuthorizableServlet.java
index baac910..5d6637c 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/DeleteAuthorizableServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/DeleteAuthorizableServlet.java
@@ -43,6 +43,7 @@ import org.apache.sling.jackrabbit.usermanager.DeleteGroup;
import org.apache.sling.jackrabbit.usermanager.DeleteUser;
import org.apache.sling.jackrabbit.usermanager.impl.resource.AuthorizableResourceProvider;
import org.apache.sling.jcr.base.util.AccessControlUtil;
+import org.apache.sling.servlets.post.AbstractPostResponse;
import org.apache.sling.servlets.post.Modification;
import org.apache.sling.servlets.post.SlingPostConstants;
@@ -114,7 +115,7 @@ public class DeleteAuthorizableServlet extends AbstractPostServlet
*/
@Override
protected void handleOperation(SlingHttpServletRequest request,
- HtmlResponse htmlResponse, List<Modification> changes)
+ AbstractPostResponse response, List<Modification> changes)
throws RepositoryException {
Session session = request.getResourceResolver().adaptTo(Session.class);
@@ -130,7 +131,7 @@ public class DeleteAuthorizableServlet extends AbstractPostServlet
if (item == null) {
String msg = "Missing source " + resource.getPath()
+ " for delete";
- htmlResponse.setStatus(HttpServletResponse.SC_NOT_FOUND, msg);
+ response.setStatus(HttpServletResponse.SC_NOT_FOUND, msg);
throw new ResourceNotFoundException(msg);
} else {
if (item instanceof User) {
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateGroupServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateGroupServlet.java
index 1b28d09..21128ec 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateGroupServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateGroupServlet.java
@@ -40,6 +40,7 @@ import org.apache.sling.jackrabbit.usermanager.UpdateGroup;
import org.apache.sling.jackrabbit.usermanager.impl.resource.AuthorizableResourceProvider;
import org.apache.sling.jcr.base.util.AccessControlUtil;
import org.apache.sling.jcr.resource.JcrResourceResolverFactory;
+import org.apache.sling.servlets.post.AbstractPostResponse;
import org.apache.sling.servlets.post.Modification;
import org.apache.sling.servlets.post.impl.helper.RequestProperty;
@@ -113,7 +114,7 @@ public class UpdateGroupServlet extends AbstractGroupPostServlet
*/
@Override
protected void handleOperation(SlingHttpServletRequest request,
- HtmlResponse htmlResponse, List<Modification> changes)
+ AbstractPostResponse response, List<Modification> changes)
throws RepositoryException {
Resource resource = request.getResource();
Session session = request.getResourceResolver().adaptTo(Session.class);
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateUserServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateUserServlet.java
index 9e04782..f26eab0 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateUserServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateUserServlet.java
@@ -37,6 +37,7 @@ import org.apache.sling.api.servlets.HtmlResponse;
import org.apache.sling.jackrabbit.usermanager.UpdateUser;
import org.apache.sling.jackrabbit.usermanager.impl.resource.AuthorizableResourceProvider;
import org.apache.sling.jcr.base.util.AccessControlUtil;
+import org.apache.sling.servlets.post.AbstractPostResponse;
import org.apache.sling.servlets.post.Modification;
import org.apache.sling.servlets.post.impl.helper.RequestProperty;
@@ -106,7 +107,7 @@ public class UpdateUserServlet extends AbstractUserPostServlet
*/
@Override
protected void handleOperation(SlingHttpServletRequest request,
- HtmlResponse htmlResponse, List<Modification> changes)
+ AbstractPostResponse response, List<Modification> changes)
throws RepositoryException {
Resource resource = request.getResource();
Session session = request.getResourceResolver().adaptTo(Session.class);
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-jackrabbit-usermanager] 03/33:
SLING-2308 Remove user password digesting from sling
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit b8a913af776bc3dd45b86a752c89b90262e0ccbf
Author: Eric Norman <en...@apache.org>
AuthorDate: Wed Nov 30 03:05:52 2011 +0000
SLING-2308 Remove user password digesting from sling
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@1208229 13f79535-47bb-0310-9956-ffa450edef68
---
.../impl/post/AbstractUserPostServlet.java | 65 +---------------------
.../impl/post/ChangeUserPasswordServlet.java | 2 +-
.../usermanager/impl/post/CreateUserServlet.java | 2 +-
3 files changed, 5 insertions(+), 64 deletions(-)
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractUserPostServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractUserPostServlet.java
index c3e188e..8d0d1e2 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractUserPostServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractUserPostServlet.java
@@ -16,12 +16,7 @@
*/
package org.apache.sling.jackrabbit.usermanager.impl.post;
-import java.io.UnsupportedEncodingException;
-import java.security.NoSuchAlgorithmException;
-import java.util.Dictionary;
-
import org.apache.felix.scr.annotations.Component;
-import org.apache.jackrabbit.util.Text;
import org.osgi.service.component.ComponentContext;
/**
@@ -30,70 +25,16 @@ import org.osgi.service.component.ComponentContext;
@Component (componentAbstract=true)
public abstract class AbstractUserPostServlet extends
AbstractAuthorizablePostServlet {
- private static final long serialVersionUID = -8401210711297654453L;
-
- /**
- * To be used for the encryption. E.g. for passwords in
- * {@link javax.jcr.SimpleCredentials#getPassword()} SimpleCredentials}
- *
- * @scr.property valueRef="DEFAULT_PASSWORD_DIGEST_ALGORITHM"
- */
- private static final String PROP_PASSWORD_DIGEST_ALGORITHM = "password.digest.algorithm";
-
- private static final String DEFAULT_PASSWORD_DIGEST_ALGORITHM = "sha1";
- private String passwordDigestAlgoritm = null;
+ private static final long serialVersionUID = 8292047684552692610L;
- // ---------- SCR Integration ----------------------------------------------
+ // ---------- SCR Integration ----------------------------------------------
- protected void activate(ComponentContext context) {
+ protected void activate(ComponentContext context) {
super.activate(context);
-
- Dictionary<?, ?> props = context.getProperties();
-
- Object propValue = props.get(PROP_PASSWORD_DIGEST_ALGORITHM);
- if (propValue instanceof String) {
- passwordDigestAlgoritm = (String) propValue;
- } else {
- passwordDigestAlgoritm = DEFAULT_PASSWORD_DIGEST_ALGORITHM;
- }
}
protected void deactivate(ComponentContext context) {
super.deactivate(context);
- passwordDigestAlgoritm = null;
}
-
- /**
- * Digest the given password using the configured digest algorithm
- *
- * @param pwd the value to digest
- * @return the digested value
- * @throws IllegalArgumentException
- */
- protected String digestPassword(String pwd) throws IllegalArgumentException {
- return digestPassword(pwd, passwordDigestAlgoritm);
- }
-
- /**
- * Digest the given password using the given digest algorithm
- *
- * @param pwd the value to digest
- * @param digest the digest algorithm to use for digesting
- * @return the digested value
- * @throws IllegalArgumentException
- */
- protected String digestPassword(String pwd, String digest) throws IllegalArgumentException {
- try {
- StringBuffer password = new StringBuffer();
- password.append("{").append(digest).append("}");
- password.append(Text.digest(digest, pwd.getBytes("UTF-8")));
- return password.toString();
- } catch (NoSuchAlgorithmException e) {
- throw new IllegalArgumentException(e.toString());
- } catch (UnsupportedEncodingException e) {
- throw new IllegalArgumentException(e.toString());
- }
- }
-
}
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java
index 3b473c0..1f18201 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java
@@ -233,7 +233,7 @@ public class ChangeUserPasswordServlet extends AbstractUserPostServlet implement
}
try {
- ((User) authorizable).changePassword(digestPassword(newPassword));
+ ((User) authorizable).changePassword(newPassword);
String userPath = AuthorizableResourceProvider.SYSTEM_USER_MANAGER_GROUP_PREFIX
+ user.getID();
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java
index c7abaf6..638bcbd 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java
@@ -293,7 +293,7 @@ public class CreateUserServlet extends AbstractUserPostServlet implements Create
"A principal already exists with the requested name: "
+ name);
} else {
- user = userManager.createUser(name, digestPassword(password));
+ user = userManager.createUser(name, password);
String userPath = AuthorizableResourceProvider.SYSTEM_USER_MANAGER_USER_PREFIX
+ user.getID();
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-jackrabbit-usermanager] 19/33: Use
released versions after release.
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit 184a6557fedb5df1e56650ada4f996f49b4cf4f2
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon Apr 22 08:40:51 2013 +0000
Use released versions after release.
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@1470410 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index f0691bb..b190807 100644
--- a/pom.xml
+++ b/pom.xml
@@ -103,7 +103,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.api</artifactId>
- <version>2.3.1-SNAPSHOT</version>
+ <version>2.4.0</version>
<scope>provided</scope>
</dependency>
<dependency>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-jackrabbit-usermanager] 05/33: Add
scope provided to dependencies
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit 273b92fb5faf7bdac300368768408b8152bb7950
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Dec 8 10:30:24 2011 +0000
Add scope provided to dependencies
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@1211805 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/pom.xml b/pom.xml
index 3441791..9e9e980 100644
--- a/pom.xml
+++ b/pom.xml
@@ -100,21 +100,25 @@
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.api</artifactId>
<version>2.1.0</version>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.servlets.post</artifactId>
<version>2.1.0</version>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-api</artifactId>
<version>2.2.0</version>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.jcr.base</artifactId>
<version>2.0.4-incubator</version>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
@@ -128,6 +132,7 @@
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.jcr.resource</artifactId>
<version>2.0.6</version>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-jackrabbit-usermanager] 24/33:
SLING-3286 - Remove plugin version overrides from poms
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit 767a7ba9e3086047f70d8c3c2cc105e745f6e8b8
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Sun Dec 15 21:28:32 2013 +0000
SLING-3286 - Remove plugin version overrides from poms
Remove most plugin version overrides. Still left in:
- a couple of projects where upgrading to the maven-bundle-plugins
leads to errors (TODOs added)
- a couple of projects where the plugin version is newer than the
one from the parent project ( comments added )
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@1551060 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 1 -
1 file changed, 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index fe64864..939d087 100644
--- a/pom.xml
+++ b/pom.xml
@@ -57,7 +57,6 @@
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>maven-sling-plugin</artifactId>
- <version>2.1.0</version>
<executions>
<execution>
<id>generate-adapter-metadata</id>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-jackrabbit-usermanager] 01/33:
[maven-release-plugin] prepare for next development iteration
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit d236f6382e7b592b6a5d8317cab10c854c093030
Author: Justin Edelson <ju...@apache.org>
AuthorDate: Fri Nov 11 18:09:42 2011 +0000
[maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@1201005 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index cd06b31..03abe2f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
<artifactId>org.apache.sling.jcr.jackrabbit.usermanager</artifactId>
<packaging>bundle</packaging>
- <version>2.2.0</version>
+ <version>2.2.1-SNAPSHOT</version>
<name>Apache Sling Jackrabbit UserManager Support</name>
<description>
Provides ResourceProvider and SlingPostOperations for the Jackrabbit
@@ -38,13 +38,13 @@
<scm>
<connection>
- scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.jcr.jackrabbit.usermanager-2.2.0
+ scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager
</connection>
<developerConnection>
- scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.jcr.jackrabbit.usermanager-2.2.0
+ scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager
</developerConnection>
<url>
- http://svn.apache.org/viewvc/sling/tags/org.apache.sling.jcr.jackrabbit.usermanager-2.2.0
+ http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/jackrabbit-usermanager
</url>
</scm>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-jackrabbit-usermanager] 20/33: Correct
reactor pom and update to parent pom 16
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit 094fc33e640599430f1ef1e9d3510d53d14b045d
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Sun May 5 14:38:24 2013 +0000
Correct reactor pom and update to parent pom 16
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@1479333 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index b190807..01cf8c3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>15</version>
+ <version>16</version>
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-jackrabbit-usermanager] 28/33:
SLING-3738 fix path prefix (use user instead of group) on password
modification
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit c13e8d2aa176145484b5cfd96f4e88409f58f61e
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Sat Jul 5 10:00:34 2014 +0000
SLING-3738 fix path prefix (use user instead of group) on password modification
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@1607991 13f79535-47bb-0310-9956-ffa450edef68
---
.../usermanager/impl/post/ChangeUserPasswordServlet.java | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java
index 756a887..a27fe0c 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java
@@ -233,13 +233,11 @@ public class ChangeUserPasswordServlet extends AbstractUserPostServlet implement
}
try {
- ((User) authorizable).changePassword(newPassword);
+ user.changePassword(newPassword);
- String userPath = AuthorizableResourceProvider.SYSTEM_USER_MANAGER_GROUP_PREFIX
- + user.getID();
+ final String passwordPath = AuthorizableResourceProvider.SYSTEM_USER_MANAGER_USER_PREFIX + user.getID() + "/rep:password";
- changes.add(Modification.onModified(userPath
- + "/rep:password"));
+ changes.add(Modification.onModified(passwordPath));
} catch (RepositoryException re) {
throw new RepositoryException("Failed to change user password.", re);
}
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-jackrabbit-usermanager] 04/33:
SLING-2312 - adding adapter annotations in usermanager bundle
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit 6bf3da362e2dd3e142deda18ddeb2818bbc9f06b
Author: Justin Edelson <ju...@apache.org>
AuthorDate: Fri Dec 2 03:08:39 2011 +0000
SLING-2312 - adding adapter annotations in usermanager bundle
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@1209347 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 20 ++++++++++++++++++++
.../impl/resource/AuthorizableResource.java | 7 +++++++
2 files changed, 27 insertions(+)
diff --git a/pom.xml b/pom.xml
index 7f4a388..3441791 100644
--- a/pom.xml
+++ b/pom.xml
@@ -55,6 +55,20 @@
<artifactId>maven-scr-plugin</artifactId>
</plugin>
<plugin>
+ <groupId>org.apache.sling</groupId>
+ <artifactId>maven-sling-plugin</artifactId>
+ <version>2.0.7-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <id>generate-adapter-metadata</id>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>generate-adapter-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
@@ -132,6 +146,12 @@
<version>1.6.0</version>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.sling</groupId>
+ <artifactId>adapter-annotations</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableResource.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableResource.java
index b7e2790..fad6c38 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableResource.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableResource.java
@@ -23,6 +23,8 @@ import javax.jcr.RepositoryException;
import org.apache.jackrabbit.api.security.user.Authorizable;
import org.apache.jackrabbit.api.security.user.Group;
import org.apache.jackrabbit.api.security.user.User;
+import org.apache.sling.adapter.annotations.Adaptable;
+import org.apache.sling.adapter.annotations.Adapter;
import org.apache.sling.api.resource.AbstractResource;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.api.resource.ResourceMetadata;
@@ -32,6 +34,11 @@ import org.apache.sling.api.resource.ValueMap;
/**
* Resource implementation for Authorizable
*/
+@Adaptable(adaptableClass = Resource.class, adapters = {
+ @Adapter({Map.class, ValueMap.class, Authorizable.class}),
+ @Adapter(condition="If the resource is an AuthorizableResource and represents a JCR User", value = User.class),
+ @Adapter(condition="If the resource is an AuthorizableResource and represents a JCR Group", value = Group.class)
+})
public class AuthorizableResource extends AbstractResource implements Resource {
private Authorizable authorizable = null;
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-jackrabbit-usermanager] 18/33:
SLING-2739 : Add methods for handling the resource type hierarchy to the
resource resolver
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit 9bf5045fd29cb76ca439079a254f589b656a6adb
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Fri Feb 22 09:09:59 2013 +0000
SLING-2739 : Add methods for handling the resource type hierarchy to the resource resolver
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@1448950 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index c382755..f0691bb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -74,6 +74,10 @@
<extensions>true</extensions>
<configuration>
<instructions>
+ <Import-Package>
+ org.apache.sling.api.resource;provide:=true,
+ *
+ </Import-Package>
<Export-Package>
org.apache.sling.jackrabbit.usermanager;version=2.2.1,
</Export-Package>
@@ -99,7 +103,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.api</artifactId>
- <version>2.1.0</version>
+ <version>2.3.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-jackrabbit-usermanager] 21/33: Update
to latest parent pom
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit 5acc1e96bbb1cd3f7e13c6dacccf16fd66534903
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Fri Jul 19 07:04:15 2013 +0000
Update to latest parent pom
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@1504788 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 01cf8c3..c32d1a6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>16</version>
+ <version>17</version>
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-jackrabbit-usermanager] 08/33: Use
released maven sling plugin
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit 54c89a936a7f19884c0fee9037129c980389dc73
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Jan 26 08:56:02 2012 +0000
Use released maven sling plugin
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@1236084 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 2ec0b95..7066cee 100644
--- a/pom.xml
+++ b/pom.xml
@@ -57,7 +57,7 @@
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>maven-sling-plugin</artifactId>
- <version>2.1.1-SNAPSHOT</version>
+ <version>2.1.0</version>
<executions>
<execution>
<id>generate-adapter-metadata</id>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-jackrabbit-usermanager] 12/33: Use
version from parent pom
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit ce391d1a65bcf3419a30e388a9378a405e5769e7
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon Jul 2 14:35:27 2012 +0000
Use version from parent pom
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@1356262 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 --
1 file changed, 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index 7f0100d..4b7b96a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -152,8 +152,6 @@
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.scr.annotations</artifactId>
- <version>1.6.0</version>
- <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-jackrabbit-usermanager] 23/33: Update
to parent pom 18
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit 01e335d556db1627f530b29b1627959c86b346c0
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Fri Sep 6 12:15:57 2013 +0000
Update to parent pom 18
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@1520554 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 9710b86..fe64864 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>17</version>
+ <version>18</version>
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-jackrabbit-usermanager] 07/33: Use
released adapter annotations.
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit 4c507d3e554ed06be469a7933fd9a8196de3df96
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Jan 26 08:52:20 2012 +0000
Use released adapter annotations.
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@1236082 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 4365906..2ec0b95 100644
--- a/pom.xml
+++ b/pom.xml
@@ -154,7 +154,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>adapter-annotations</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.0</version>
<scope>provided</scope>
</dependency>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-jackrabbit-usermanager] 06/33: using
next snapshots during release process
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit 582d964b9eb9fb89ac44a8586ecd96a3689cd6ab
Author: Justin Edelson <ju...@apache.org>
AuthorDate: Thu Jan 12 17:20:53 2012 +0000
using next snapshots during release process
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@1230650 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index 9e9e980..4365906 100644
--- a/pom.xml
+++ b/pom.xml
@@ -57,7 +57,7 @@
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>maven-sling-plugin</artifactId>
- <version>2.0.7-SNAPSHOT</version>
+ <version>2.1.1-SNAPSHOT</version>
<executions>
<execution>
<id>generate-adapter-metadata</id>
@@ -154,7 +154,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>adapter-annotations</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>1.0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-jackrabbit-usermanager] 30/33: Fix
missing definition of servlet.post.dateFormats in CreateGroupServlet and
UpdateGroupServlet
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.2.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit fb4df9a661b6121fb54f524dfbcf12c32155185c
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Tue Jul 29 15:00:02 2014 +0000
Fix missing definition of servlet.post.dateFormats in CreateGroupServlet
and UpdateGroupServlet
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@1614372 13f79535-47bb-0310-9956-ffa450edef68
---
.../jackrabbit/usermanager/impl/post/CreateGroupServlet.java | 11 ++++++++++-
.../jackrabbit/usermanager/impl/post/UpdateGroupServlet.java | 11 ++++++++++-
2 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateGroupServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateGroupServlet.java
index 5b38101..cb9334d 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateGroupServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateGroupServlet.java
@@ -96,7 +96,16 @@ import org.apache.sling.servlets.post.impl.helper.RequestProperty;
@Property (name="sling.servlet.methods",
value="POST"),
@Property (name="sling.servlet.selectors",
- value="create")
+ value="create"),
+ @Property (name=AbstractAuthorizablePostServlet.PROP_DATE_FORMAT,
+ value={
+ "EEE MMM dd yyyy HH:mm:ss 'GMT'Z",
+ "yyyy-MM-dd'T'HH:mm:ss.SSSZ",
+ "yyyy-MM-dd'T'HH:mm:ss",
+ "yyyy-MM-dd",
+ "dd.MM.yyyy HH:mm:ss",
+ "dd.MM.yyyy"
+ })
})
public class CreateGroupServlet extends AbstractGroupPostServlet implements CreateGroup {
private static final long serialVersionUID = -1084915263933901466L;
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateGroupServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateGroupServlet.java
index 21128ec..41c7bbf 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateGroupServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateGroupServlet.java
@@ -96,7 +96,16 @@ import org.apache.sling.servlets.post.impl.helper.RequestProperty;
@Property (name="sling.servlet.methods",
value="POST"),
@Property (name="sling.servlet.selectors",
- value="update")
+ value="update"),
+ @Property (name=AbstractAuthorizablePostServlet.PROP_DATE_FORMAT,
+ value={
+ "EEE MMM dd yyyy HH:mm:ss 'GMT'Z",
+ "yyyy-MM-dd'T'HH:mm:ss.SSSZ",
+ "yyyy-MM-dd'T'HH:mm:ss",
+ "yyyy-MM-dd",
+ "dd.MM.yyyy HH:mm:ss",
+ "dd.MM.yyyy"
+ })
})
public class UpdateGroupServlet extends AbstractGroupPostServlet
implements UpdateGroup {
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.