Closed (won't fix)
Project:
Views (for Drupal 7)
Version:
6.x-3.x-dev
Component:
user data
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
15 Oct 2009 at 09:07 UTC
Updated:
26 Jul 2017 at 11:01 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
tomsm commentedI would like to change this into a feature request: "Validate user argument is current user", as mentioned in this issue with the Flag project: http://drupal.org/node/596594
Comment #2
RoboPhred commentedFor consistancy, the argument should probably be "Current user or admin", and also give access if the user has "Administrate users" or similar permission.
Comment #3
tomsm commented@ RoboPhred
That's a good idea.
Comment #4
heather commentedThis is not a documentation issue. Just tidying up.
This may be a User data issue. Noted on Obtaining support for Views issues http://drupal.org/node/571990
Comment #5
404 commentedsubscribe
Comment #6
ericduran commentedThis can be accomplish by adding a "User: Current" filter to the views.
Feel free to change it back to active if I am wrong.
Comment #7
tomsm commentedThat is true, when I use this filter I cannot see the flagged content of other users.
But I can see the username that corresponds to the uid.
I get for example:
some_user's favorites
This user has not yet bookmarked any content.
So by changing the argument (=uid), I get information about the username and that is something I want to avoid for privacy and security reasons.
Comment #8
ericduran commentedThis patch add an "Only allow current user or admin" checkbox to the user validator.
I ran some test and nothing seem to had broken with the patch.
I'm no views expert so someone could probably implement it better.
All comments welcome.
Comment #9
merlinofchaos commentedneeds review is more likely to get attention =)
Comment #10
dawehnerwe don't have to use globals here.
Powered by Dreditor.
Comment #11
ericduran commentedHere's an updated patch not using Globals.
Thanks for that.
Comment #12
rburgundy commentedHi,
Just grammar-wise:
should be
Comment #13
dawehnerso
Comment #14
mparker17Subscribe
Comment #15
dawehnershould be
:)
Comment #16
dawehnerWe could save here also at last one or two if's
Comment #17
robby.smith commentedsubscribing
Comment #18
kenorb commentedRelated #404768: Filter which compare user selected from filter with current logged user
Comment #19
lgb commentedsubscribe
Comment #20
ericduran commentedlol, so I actually don't like this patch. Do we really want to hard code the settings to the 'administer users' permission. Wouldn't we want to make it a little more flexible than that?
Comment #21
dagmarI agree with @ericduran, 'administer users' is really a harmful perm. This patch allow to configure which permission is necessary if argument is not the current user.
Comment #22
merlinofchaos commentedRole checking is a lot easier than permission checking, so I'd rather not go that route.
Also, this patch would simplify this a lot: http://drupal.org/node/644008 -- the use of actual permissions rather than validation.
Comment #23
dunx commentedThis is quite an old thread, but I have exactly the same issue as the OP.
I can't see that this patch has been applied and I can't find a suitable solution via Views alone, so I thought I'd post something here in case there is an alternative solution these days and I've missed something.
Basically, Views view Access based on whether the user argument passed in is the current user (or the current user is admin). I don't want any old user able to view other user's Bookmarks.
Comment #24
mustanggb commented