Issue #2031115 by tim.plunkett: Fixed Language::LANGUAGE_DEFAULT should be Language::LANGCODE_DEFAULT.
parent
dc6aeae89c
commit
0c957d310a
|
@ -25,7 +25,7 @@ class EntityAccessController implements EntityAccessControllerInterface {
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function access(EntityInterface $entity, $operation, $langcode = Language::LANGUAGE_DEFAULT, AccountInterface $account = NULL) {
|
||||
public function access(EntityInterface $entity, $operation, $langcode = Language::LANGCODE_DEFAULT, AccountInterface $account = NULL) {
|
||||
if (!$account) {
|
||||
$account = $GLOBALS['user'];
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ class ActionAccessController extends EntityAccessController {
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function access(EntityInterface $entity, $operation, $langcode = Language::LANGUAGE_DEFAULT, AccountInterface $account = NULL) {
|
||||
public function access(EntityInterface $entity, $operation, $langcode = Language::LANGCODE_DEFAULT, AccountInterface $account = NULL) {
|
||||
return user_access('administer actions', $account);
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ class ConfigTestAccessController extends EntityAccessController {
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function access(EntityInterface $entity, $operation, $langcode = Language::LANGUAGE_DEFAULT, AccountInterface $account = NULL) {
|
||||
public function access(EntityInterface $entity, $operation, $langcode = Language::LANGCODE_DEFAULT, AccountInterface $account = NULL) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ class ViewAccessController extends EntityAccessController {
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function access(EntityInterface $entity, $operation, $langcode = Language::LANGUAGE_DEFAULT, AccountInterface $account = NULL) {
|
||||
public function access(EntityInterface $entity, $operation, $langcode = Language::LANGCODE_DEFAULT, AccountInterface $account = NULL) {
|
||||
return $operation == 'view' || user_access('administer views', $account);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue