Great Module!

I got a feature request:
Is it possible to leave the password field empty? No a warning is shown, that I have to enter a password..
But on some nodes I don't want a password protection..

Would be great!

Comments

greg.harvey’s picture

Hi,

I see what you mean - normally I would say create *two* FileFields on your content type. One using this widget and one using the normal widget. Neither will display if no file is uploaded, so you only need upload to the one you need, depending on whether or not this node's files need a password.

However, I see the value in what you're asking. I'll leave this open. I'm sure bellesmanieres will have an opinion on this.

Breakerandi’s picture

Well, its a question of usability.. 2 filefields mean one field more in the node edit form than really needed.

greg.harvey’s picture

I agree, that's why the issue is still active... ;-)

bellesmanieres’s picture

Status: Active » Closed (works as designed)

Hi,
I'm not too sure what to think about it :
- one the one hand, nothing I can think of prevents the feature from a technical point of view, plus I understand the point of having one single field.
- on the other hand, that makes the system weaker : we now prevent the download unless both a code is set and the user knows that code. Making the code optional would mean, on the contrary, allowing the download unless a code is set.

While it may not seem such a difference, it involves that we "leave the door open" in case something prevents the code to be set (be it a bug, database corruption or, more likely, the fact that an admin forgot to set a code while uploading the file).

Should I rely on such a module as user, i think I would expect it to "lock" all files in case something went wrong instead of letting free access to everything. That, and the ease with which one could forget to set the code, make me tend to give precedence to security over the annoyance of having two fields instead of one.

bellesmanieres’s picture

greg.harvey’s picture

Status: Closed (works as designed) » Active

What if it were a checkbox you have to actively tick, saying something like "No code" - the module insists on a code unless you tick the box, which is a positive action you must take if you do NOT want a code. This way there's no chance someone can accidentally not set a code.

bellesmanieres’s picture

That seems the way to go, either with a checkbox or, following what's in use for blocks title and other fields, by setting the field to <none> . It would keep the edit form less cluttered ?

Breakerandi’s picture

Sounds good to me!

greg.harvey’s picture

<none> works for me too.

bellesmanieres’s picture

Version: 6.x-1.0 » 6.x-1.x-dev
Assigned: Breakerandi » bellesmanieres
Status: Active » Needs review

The feature has been added in 6.x-1.x-dev. Needs a bit of testing before being commited in stable.