jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angela Schreiber <anch...@adobe.com>
Subject Re: New information about my last email...
Date Wed, 19 Jan 2011 10:16:44 GMT
hi javier

On 1/19/11 11:00 AM, Javier Arias wrote:
> Hi Angela, my problem was solved. The problem was: supose I have
> "jackrabbit-standalone" in the
> folder: /home/user/server/jackrabbit-standalone.jar when you start
> jackrabbit-standalone it creates a folder "jackrabbit". I was creating a
> TransientRepository with url /home/user/server/ and not
> with /home/user/server/jackrabbit taht is the correct. Now it works
> perfectly.
> Besides , I have a new task. I want to allow only two users for my
> webdav server. One user will be admin. I have changed his password and I
> will use it only for management tasks. I have created another user to
> access to the repository to add and remove files, but with him, I can
> not upload resources to server. How I give him privileges to do it?

use the jcr access control management to grant this editing user
the permissions to manipulate a node (and it's child nodes)... this most 
probably includes the following privileges:

and eventually jcr:nodetypeManagement

the first 4 privileges are aggregated in jcr:write, while rep:write
also includes the latter privilege.

something like:

1. access the ac manager by means of session.getAccessControlManager()
2. retrieve the applicable policies at your target node or -
    alternatively - the policies already set to have them modified.
3. in jr the policies are normally accesscontrollist(s) -> modify
    the acl by granting the privileges for your users principal
4. reapply the modified policy (AcMgr.setPolicy)
5. save the changes in order to have them take effect

JSR283 and the API javadoc may give you some additional information
about how it works. jackrabbit in addition defines some extensions
to the JCR api.

> Another problem is with anonymous user. I have removed this user but
> when I start the server, it is created again. I have tried too change
> the anonymous password but it does not work, the password is always the
> same. It is a problem because everyone can access with
> "anonymous/anonymous".

the system users admin and anonymous are always recreated in the default
setup. but you may "disable" the anonymous user. this will prevent any
login as this user... see


hope that helps
> Thank you. Best regards.
> El mar, 18-01-2011 a las 14:23 +0100, Angela Schreiber escribió:
>> hi javier
>> and you are really sure that you changed to admin-password in the
>> repository instance you are accessing with the http request?
>> from the top of my head i don't see any reason, why you should
>> be able to login with another password than the one stored with
>> the corresponding use.... and - as far as i know - there was no
>> other login that a simple repository.login whose behavior depends
>> on the configured login module.
>> regards
>> angela
>> On 1/17/11 1:04 PM, Javier Arias wrote:
>>> About the last email, I have copied a repository.xml that I had saved in
>>> another folder. And now I can execute my code and I do not have problem
>>> with userManager.
>>> But the behaviour of the server is strange. I have changed the admin
>>> password, now the password is admin2. If I login from java code, I must
>>> type, username = "admin" and password = "admin2". If I loggin from
>>> browser I must type username = "admin" and password = "admin2", this is
>>> very strange!! The same occur if I create a new user. From Java code I
>>> can loggin with new user, but from the browser I can not loggin in.
>>> I think it can be from repository configuration. Do you have a
>>> configuration file as default?
>>> I have attached my repository.xml if you want see it.
>>> Thank you. Regards.

View raw message