Upgrade to 3.4.3
This commit is contained in:
@@ -17,6 +17,15 @@ use Kirby\Toolkit\Str;
|
||||
*/
|
||||
class SiteRules
|
||||
{
|
||||
/**
|
||||
* Validates if the site title can be changed
|
||||
*
|
||||
* @param \Kirby\Cms\Site $site
|
||||
* @param string $title
|
||||
* @return bool
|
||||
* @throws \Kirby\Exception\InvalidArgumentException If the title is empty
|
||||
* @throws \Kirby\Exception\PermissionException If the user is not allowed to change the title
|
||||
*/
|
||||
public static function changeTitle(Site $site, string $title): bool
|
||||
{
|
||||
if ($site->permissions()->changeTitle() !== true) {
|
||||
@@ -30,6 +39,14 @@ class SiteRules
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates if the site can be updated
|
||||
*
|
||||
* @param \Kirby\Cms\Site $site
|
||||
* @param array $content
|
||||
* @return bool
|
||||
* @throws \Kirby\Exception\PermissionException If the user is not allowed to update the site
|
||||
*/
|
||||
public static function update(Site $site, array $content = []): bool
|
||||
{
|
||||
if ($site->permissions()->update() !== true) {
|
||||
|
Reference in New Issue
Block a user