mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-27 23:50:30 +00:00
Merge "MinervaPagePermissions: Don't assume that indirectly editable contents don't have an edit action"
This commit is contained in:
commit
15eaff1a5a
|
@ -213,9 +213,23 @@ final class MinervaPagePermissions implements IMinervaPagePermissions {
|
|||
* @return bool
|
||||
*/
|
||||
protected function isCurrentPageContentModelEditable() {
|
||||
return $this->contentHandler
|
||||
&& $this->contentHandler->supportsDirectEditing()
|
||||
&& $this->contentHandler->supportsDirectApiEditing();
|
||||
if ( !$this->contentHandler ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (
|
||||
$this->contentHandler->supportsDirectEditing() &&
|
||||
$this->contentHandler->supportsDirectApiEditing()
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// For content types with custom action=edit handlers, let them do their thing
|
||||
if ( array_key_exists( 'edit', $this->contentHandler->getActionOverrides() ?? [] ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue