Not sure whether this is a support request or a bug report.

The Docs in the readme.txt mention that "view ratings" is a seperate permission.

3) Enable anonymous voting.
If you want to allow anonymous voting, you'll need to set permissions for
that. Use Administer -> User Management -> Access Control, and check the
"rate content" and "view ratings" checkboxes for the roles you'd like.
You'll find these permission items under the "fivestar module" heading.

yet I don't see this permission under the fivestar section of Access control.

Indeed fivestar_perm() only has
'rate content', 'use PHP for fivestar target';

Pity, I could use this permission :-)
Was it available in an earlier version?
If so, were there problems associated with it that caused it to be removed?

Regards
Alan

CommentFileSizeAuthor
#2 anonymous_view.patch1006 bytesblackdog

Comments

alanburke’s picture

Version: 6.x-1.11-beta3 » 5.x-1.11-beta3

Wrong version

blackdog’s picture

Component: Documentation » Code
Status: Active » Needs review
StatusFileSize
new1006 bytes

I've created a patch for the block view, added a permission to 'view ratings', and showing an average rating in the block if that perm is set. Not sure if this is the appropriate way, but it seems to work.

alanburke’s picture

Status: Needs review » Needs work

Thanks blackdog

Its a start.
You need to add the permission alright,

But there are other places where that permission need to be tested against.
Your patch only runs a test when dsiplaying a block.
It doesn't check when it is being displayed inline in the node content.

It would be good to get the background before embarking on the patch.
Was the permission there at one time and then removed [hence out of date docs]
Or were the docs written but this permission never added?

Regards
Alan

blackdog’s picture

I'm sure there are other places, but this patch was created out of necessity, since I needed the block view for anonymous users on a current project.

If a maintainer could answer the questions alanburke has raised that would awesome, so I know if there's any point in me going forward with the other cases this patch should cover.

quicksketch’s picture

Title: View Ratings permission not available » Implement View Ratings permission
Version: 5.x-1.11-beta3 » 6.x-1.13
Category: bug » feature

The "view ratings" permission was added in the very first version of the module, but it never actually did anything. Considering it didn't work, I removed it from later versions of the module. The lingering information in the README is unintentional. I'll change this to a feature request.

ahkiam’s picture

I would also like a 'view rating' permission for 5.x-1.9

PeterErnst’s picture

Version: 6.x-1.13 » 6.x-1.19

I also have the same problem like alanburke.



I can't use the Fivestar rating module until there is a permission to control the role which is allowed to see the votes for a node.

I haven't the problem with the Fivestar-CCK Field. But this is only for one vote and without comment. To vote a node and

giving a comment is a nice feature. But only usable if you can select which user can view the results. The same feature is

requested in hiding vote from a specific role.



So maybe it is possible to implement the "view ratings" access permissions for the roles. I'm not a coder but I would review/test

a bugfix/feature implementation.



Regards



Peter


Weka’s picture

+1

Taxoman’s picture

Version: 6.x-1.19 » 7.x-2.x-dev
whitefluffy’s picture

What's the status for allowing anonymous users to view, and only view, ratings?

Currently using the 7.x-2.x-dev version.

ericduran’s picture

@heyintern, I honestly haven't even thought about this for d7. I didn't even know this issue was move to the 7.x-2.x branch.

So I'm going to move this back to 6.x where it originated and has a patch.

Is this a popular feature? There seems to be a lot of one of request on the issue queue.

ericduran’s picture

Version: 7.x-2.x-dev » 6.x-2.x-dev
whitefluffy’s picture

@ericduran Thank you for your respons.

I was really surprised when I realized that it wasn't possible to let anonymous users SEE the ratings, but not vote. I can't imagine I'm the only one who want this included in the fivestar module.

If I, or one of my colleagues, comes up with a solution, we will post a patch. I believe that this feature is important to get in to the module.

gawi’s picture

It would be great to have such functionality in Fivestar module.
Using the 7.x-2.x-dev version.

whitefluffy’s picture

Version: 7.x-2.x-dev » 6.x-2.x-dev
Category: bug » feature

Edit: Removed misleading link due to a misunderstanding.

ericduran’s picture

@heyintern that issue is a completely different issue, that has zero to do with this issue.

Also that issue is a small bug/oversight, this issue is an actual future request.

Please do not discussed this issue over at the other issue.

Thanks.

ericduran’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev
Category: feature » bug

Ok, I'm moving this to 7.x and asking feedback.

Marking as a bug report too, so this is definitely going to get in on the 7.x branch.

What is the permission name? View Ratings isn't going to work is way to generic for fivestar. Is there a better recommendation?

What should the description of the permission be?

I assume when a user doesn't have permissions to see the stars this will display nothing?

Toxid’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev
Category: feature » bug

Since the module now uses fields, perhaps it would be a good idea to use Field permissions module. It provides these permissions to any field:

Create FIELD (edit on node creation).
Edit FIELD, regardless of node author.
Edit own FIELD on node created by the user.
View FIELD, regardless of node author.
View own FIELD on node created by the user.

I actually tried to use the module when I discovered this issue. Those permissions would fit most needs, including what they're discussing here Prohibit members from voting on their OWN nodes. I realize these permission names are generic, so maybe other names would be more appropriate as ericduran said. But in the end the functionality is what is important IMO, so I thought I'd put the suggestion out there anyway.

ericduran’s picture

@Toxid yes, as of this weekend this is now possible with field permissions.

There still going to be some issues because #1224700: Remove custom views formatters but those should be fix there. This issue might be good to close now.

Toxid’s picture

@ericduran, I could not get it to work when I tried to use Fivestar with Field permissions. Roles that are given the "view field_vote" permission can't see the rating (only empty stars) unless they also have the "rate content" permission, and then of course they are also able to place a rating as well.

ericduran’s picture

@Toxid , yeah we'll have to change the fivestar code to stop using our own permissions and use field_permissions.

This should work as expected when using the widget "Stars (while editing)" because this widget works like a normal widget.

The issue is really when using "stars (while viewing)" because this is a custom widget that doesn't work like any other field widget.

It's going to need some work :-(

ericduran’s picture

Status: Needs work » Closed (won't fix)

This is probably never going to make it in. At least not in the d7 branch. We'll figure out a better way of handling permissions. But this doesn't really apply anymore especially with the way fivestar is handle in d7.

dougthelegoman’s picture

@Toxid I think that field permissions is the answer. Directions:
1. Add two "Fivestar Rating" fields using the "Stars (rated while viewing) widget" to a node. (Be sure that they use the same voting api tag.)
2. Under "Manage Display," set one field to "As Stars" format and the other as "Rating (i.e. 4.2/5)."
3. Allow all users to view the Rating field only and privileged users to see both.

matt.rad’s picture

+1