Skip to content
This repository was archived by the owner on Oct 13, 2025. It is now read-only.

Commit 1be28bf

Browse files
author
Otis Wright
committed
Updating Link Extensions
Updating Link Extensions to allow content authors to edit links
1 parent e03a6eb commit 1be28bf

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

code/LinkExtension.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,20 @@ public function getAttributes(){
5353

5454
return join(' ', [$this->owner->getTargetAttr(), $this->getDownloadAttribute(), $this->getTitleAttribute()]);
5555
}
56-
}
56+
57+
public function canView($member = null) {
58+
return Permission::check('CMS_ACCESS_CMSMain', 'any', $member);
59+
}
60+
61+
public function canEdit($member = null) {
62+
return Permission::check('CMS_ACCESS_CMSMain', 'any', $member);
63+
}
64+
65+
public function canDelete($member = null) {
66+
return Permission::check('CMS_ACCESS_CMSMain', 'any', $member);
67+
}
68+
69+
public function canCreate($member = null) {
70+
return Permission::check('CMS_ACCESS_CMSMain', 'any', $member);
71+
}
72+
}

0 commit comments

Comments
 (0)