Logo
Explore Help
Sign In
MetuFSS
/
metu.life
2
1
Fork
You've already forked metu.life
0
Code Issues Pull Requests Releases Wiki Activity
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9004 Commits
1 Branch
0 Tags
134 MiB
Tag: Branch: Tree: 51ff679b9d
master
Branches Tags
${ item.name }
Create tag ${ searchTerm }
Create branch ${ searchTerm }
from '51ff679b9d'
${ noResults }
metu.life/app/policies/poll_policy.rb

8 lines
241 B
Raw Normal View History Unescape Escape

Add polls (#10111) * Add polls Fix #1629 * Add tests * Fixes * Change API for creating polls * Use name instead of content for votes * Remove poll validation for remote polls * Add polls to public pages * When updating the poll, update options just in case they were changed * Fix public pages showing both poll and other media
6 years ago
# frozen_string_literal: true
class PollPolicy < ApplicationPolicy
def vote?
Ensure only people allowed to see the poll can actually vote (#10161)
6 years ago
StatusPolicy.new(current_account, record.status).show? && !current_account.blocking?(record.account) && !record.account.blocking?(current_account)
Add polls (#10111) * Add polls Fix #1629 * Add tests * Fixes * Change API for creating polls * Use name instead of content for votes * Remove poll validation for remote polls * Add polls to public pages * When updating the poll, update options just in case they were changed * Fix public pages showing both poll and other media
6 years ago
end
end
Powered by Gitea Version: 1.17.3 Page: 1005ms Template : 16ms
English
Bahasa Indonesia Deutsch English Español Français Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Српски Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API Website