mirror of
https://github.com/flarum/framework.git
synced 2024-11-30 21:44:12 +08:00
Fix Permission Name (#965)
This commit is contained in:
parent
7d448e81ff
commit
6061f404f9
|
@ -173,10 +173,10 @@ export default class PermissionGrid extends Component {
|
|||
moderateItems() {
|
||||
const items = new ItemList();
|
||||
|
||||
items.add('viewPostIps', {
|
||||
items.add('viewIpsPosts', {
|
||||
icon: 'bullseye',
|
||||
label: app.translator.trans('core.admin.permissions.view_post_ips_label'),
|
||||
permission: 'discussion.viewPostIps'
|
||||
permission: 'discussion.viewIpsPosts'
|
||||
}, 110);
|
||||
|
||||
items.add('renameDiscussions', {
|
||||
|
|
|
@ -47,7 +47,7 @@ class PostSerializer extends PostBasicSerializer
|
|||
if ($canEdit) {
|
||||
$attributes['content'] = $post->content;
|
||||
}
|
||||
if ($gate->allows('viewPostIps', $post)) {
|
||||
if ($gate->allows('viewIps', $post)) {
|
||||
$attributes['ipAddress'] = $post->ip_address;
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue
Block a user