Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.x-dev
Component:
user data
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
3 Feb 2009 at 22:23 UTC
Updated:
3 Jan 2014 at 00:07 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dwwLooks like I'm writing the code for this... stay tuned.
Comment #2
dwwComment #3
merlinofchaos commentedThis will be better if how it validates is specified as an option. I can see a need for validating both but some uses may prefer just one or the other.
It probably also should allow validating by role similar to validating by type.
Comment #4
dwwAdds:
A) Set of radios to control what type of user argument to allow
B) Checkbox if you want to restrict based on role
C) If (B) is checked, a multi-select to chose which roles you want to restrict to.
See attached patch and screenie.
Comment #5
merlinofchaos commentedCommitted. I thought about saying the select needed to be checkboxes, then I remembered what a pain it is to make checkboxes work with the dependencies. It can but that can be patched later if anybody notices the inconsistency and cares.
Comment #6
aclight commentedBy the way, I'm seeing these radio boxes and the restrict based on role checkbox regardless of what validator I have selected. This is using the Taxonomy: Term ID argument type, but I doubt it's specific to just that argument handler.
Comment #7
dwwArgh, yup, I see that now, too.
@merlinofchaos: What did I do wrong? ;) I thought views automagically got this right for me... Please show me the error of my ways.
Thanks/sorry,
-Derek
Comment #8
bobgeier commentedDerek (and merlin),
Thanks for the coding on this. The role selection in particular is very helpful for some work I'm doing currently. Or will be as soon as a few of the other 2.3 issues get cleaned up!
Comment #9
merlinofchaos commenteddww: Sorry no, it's actually a pain in the ass right now. Here's a patch. I don't trust myself right now or I'd just commit it. Please test this for me?
Comment #10
dwwSorry Earl, I've been away from work for the last week. Just getting caught up now. I tested this and it's not working properly. The "Type of user argument to allow:" header is still always present regardless of what kind of validator you select, and the radios themselves don't appear, even if you do choose "user". I'll work on debugging and fixing the patch, stay tuned.
Comment #11
dwwThat was relatively painless. ;)
A) We forgot to keep expand_radios in the #process array
B) We apparently needed a wrapper div around the whole radios form element to catch the label.
This patch works with my testing. Someone else verifying would be appreciated.
Comment #12
merlinofchaos commentedComment #13
cdale commentedDoes this mean that User:UID and User:name arguments could be merged into one, as they both would be able to function interchangeably? Or would it need to wait for a 'multiple validators per argument' feature so you could still use the node/taxonomy validations at the same time as one of UID or Name, but not both?
Comment #14
dww@cdale: No.
"User: Name" is a username, a string. The underlying value passed to the query is a string.
"User: UID" is a UID, an integer. The underlying value passed to the query is a number. There's now an argument validator that takes usernames and converts them into the UID integer to pass into the query but the value is still the integer in this case.
Therefore, these are still separate arguments. Hope that helps clarify.
Comment #15
eikes commentedhas this been committed and is it in the dev version? when will 2.4 be released?
Comment #16
dwwhas this been committed and is it in the dev version?
Yes.
when will 2.4 be released?
When it's ready. ;)
Comment #17
eikes commentedThank You