Is this possible? I need it for anonymous users, so another modules are not able to solve this. And Protected node works fine for anonymous users, but for Viewing is password needed and this is not so usable... It will be nice everyone could post a node, protect this with password, everyone could see this node, and with proper password, it would be possible to edit and delete this node.

Comments

AlexisWilke’s picture

Assigned: Unassigned » AlexisWilke
Status: Active » Fixed

At this time, the "bypass password protection" permission gives you all permissions. But I would assume that you are not giving anonymous users a way to edit or delete a node. So yes. It is possible.

Mark the anonymous account with the "bypass password protection" permission and you should be set.

Thank you.
Alexis Wilke

eL’s picture

Status: Fixed » Active

Thanks, but it doesnt seems to solve my problem (and it is not only mine). If I set edit specific node type permission, than anonymouse could edit this node without password. And without edit permission, Protected node doesnt work.

May be, I am missing something.

But functionality described above - allow to anonymous user create and edit own nodes is very usefull for second-hand site, where is a lot of merchandising published and user registration is absolutely not needed. Protected node seems very promising, because password is best aproach, to allow anonymous user to edit his content.

AlexisWilke’s picture

Component: Documentation » Code
Category: support » feature
Status: Active » Fixed

Okay, I see what you mean. Actually, many problems were there. This is now fixed.

You may want to read the story about permissions here:

  http://www.m2osw.com/doc-protected-node-permissions

Note that I renamed the "edit protected content" and each node type into "edit any password" and corresponding types. Run the 6001 update to get it automatically changed in your DB.

Thank you.
Alexis Wilke

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

eL’s picture

Status: Closed (fixed) » Active

Thanks a lot! It works fine.

Here are some hints for another improvements:

- setting for default collapsed or open fieldset
- setting for position on form (transform this module to cck field?)
- setting for default set for "This @type is protected" as selected or unselected
- visibility of fieldset on role basis - Anonnymous should see this form, registered user not

...only some hints how to make module better. There are another solutions to solve this outside the module. So, only for consideration...

AlexisWilke’s picture

eL,

You may want to test the latest version some more... 8-)

* Default collapsed or open fieldset

Which one? There are fieldsets in the Globals, the Node Edit form, and the password form.

The Node Edit form is "smart", similar to the Menu fieldset which is closed until you assign a menu item to that node.

* Position on form using CCK

This is done.

* Default set for "This @type is protected" as selected or unselected

Yes. I would like to add a fieldset to all the Node Types to select such things as:

1) Never protected (fieldset never shown);
2) "Protectable" Node (and then whether it is protected by default or not);
3) Always Protected (fieldset does not show the protected flag, it's always set.)

* Protected nodes based on roles

As far as I know that's already done. See the Permissions, there is a set of flags there. Test with the "view" permission.

Btw, you should have created a new issue for each feature...

Thank you.
Alexis

eL’s picture

* Position on form using CCK - ehh, I am blind, you are right, this is realy here. Nice.

* Default collapsed or open fieldset - I mean fieldset on node edit form, where author create a password. I am not sure, what you mean, that this form is smart. I need to have this form well visible for user, to navigate him to add password.

* Default set for "This @type is protected" as selected or unselected - function described as you wrote will be great, but for now, for setting fieldset to open by default, I am looking into the node-form values, but I could not find options for overide this values through form_alter...

AlexisWilke’s picture

Okay, I added support in the node type for:

1) selecting the state of the field set on opening the node edit form;

2) selecting whether a password is required or not (never, always);

3) selecting whether the password is turn ON or OFF by default (as before; protected by default);

4) defining a password per node type (similar to the global password, but limited to a node type);

5) fixed a few things, and added missing documentation.

What you were asking for is (1) and (3). (2) is a side effect of (3) that was dead easy to implemented, I wanted the "Never" feature since that helps marking some node types as never having a protected node field. I find that nice for UID 1 to avoid seeing that field. Plus that way we avoid protecting any one of these nodes.

(4) is something I was planning, makes sense to have different groups of people who can access sets of pages determine by node types.

(5) is a consequence of working on the code... 8-)

The new 6.x-1.x-dev (within 12h) will include those changes.

Thank you.
Alexis

See: http://drupalcode.org/project/protected_node.git/commit/5de2eba

AlexisWilke’s picture

Status: Active » Fixed

Actually this means this issue is fixed (again.)

Feel free to re-open if you find a problem.

Don't forget, these additions are in the node type form:

Administer » Content management » Content types

Thank you.
Alexis

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.