mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 11:17:49 +01:00
Add power_user? method to User model
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
postId: @post.id,
|
||||
postStatuses: @post_statuses,
|
||||
isLoggedIn: user_signed_in?,
|
||||
isPowerUser: user_signed_in? ? (current_user.role == 'admin' || current_user.role == 'moderator') : false,
|
||||
isPowerUser: user_signed_in? ? current_user.power_user? : false,
|
||||
authenticityToken: form_authenticity_token,
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user