Continuing the discussion from Should it be possible to flag a closed issue? :
So, I’m trying to re-open this topic:
Repro:
Get notified of a pending member
visit the admin page at /admin/users/list/pending
click the checkbox next to the new person
click Approve at the bottom of the screen
dismiss the congratulatory dialog box
View that the user is still listed.
Expected: that the account is no longer visible
refresh the page and the user will no longer be listed (as the approval was carried out successfully)
Bonus points for providing a link to /admin/users/list/new so the new user(s) can be reviewed
because I still have that issue.
However, I’ve already flagged it once, and I’m getting a 500 error on meta.
I tried to flag the follow up:
Continuing the discussion from Newly approved members remain visible after approval :
I just tried to flag this closed issue (the problem happened again) and received a 500 error on meta.
Should the flag button be disabled, or should flags be allowed on closed topics, or ?
and I think it worked once, but can’t tell, and I get a 500 error when I try a second time.
So, I have a new bug, and I’d like topic 27636 re-opened for discussion, please.
2 Likes
techAPJ
(Arpit Jalan)
May 7, 2015, 4:42pm
2
Flagging a topic/post is only allowed once per user, as per this code:
"full"
elsif SiteSetting.allowed_link_domains.present?
"limited"
else
"none"
end
end
def can_post_link?(host: nil)
return false if host.blank?
unrestricted_link_posting? || SiteSetting.allowed_link_domains.split("|").include?(host)
end
# Can the user act on the post in a particular way.
# taken_actions = the list of actions the user has already taken
def post_can_act?(post, action_key, opts: {}, can_see_post: nil)
return false if !(can_see_post.nil? && can_see_post?(post)) && !can_see_post
# no warnings except for staff
if action_key == :notify_user && (post.user.blank? || (!is_staff? && opts[:is_warning]))
I will improve the error message to make it more clear.
1 Like
Thanks @techAPJ
I was getting a 500 error on meta, not a message saying my action wasn’t allowed.
Also, I hope that the message would be displayed before I can enter my post.