Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
Qpixel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIP
Answers
Qpixel
Commits
2770b5f6
Unverified
Commit
2770b5f6
authored
Aug 2, 2023
by
ArtOfCode
Committed by
GitHub
Aug 2, 2023
Browse files
Options
Downloads
Plain Diff
Merge pull request #1154 from eip-ewi/fix-redacted-history-error-for-non-signed-in-user
parents
cc992687
3a81b307
No related branches found
No related tags found
2 merge requests
!51
Upgrade to latest qpixel
,
!50
Update to latest codidact changes
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/models/post_history.rb
+1
-1
1 addition, 1 deletion
app/models/post_history.rb
with
1 addition
and
1 deletion
app/models/post_history.rb
+
1
−
1
View file @
2770b5f6
...
...
@@ -16,7 +16,7 @@ class PostHistory < ApplicationRecord
# @param user [User]
# @return [Boolean] whether the given user is allowed to see the details of this history item
def
allowed_to_see_details?
(
user
)
!
hidden
||
user
.
is_admin
||
user_id
==
user
.
id
||
post
.
user_id
==
user
.
id
!
hidden
||
user
&
.
is_admin
||
user_id
==
user
&
.
id
||
post
.
user_id
==
user
&
.
id
end
def
self
.
method_missing
(
name
,
*
args
,
**
opts
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment