-
Notifications
You must be signed in to change notification settings - Fork 681
Closed
Closed
Copy link
Labels
Description
Description
I installed 4.0.0-beta.1 and create new section with just title field only.
I added none admin user, and add permission for editing entry in the section.
When this none admin user create entry, can't save draft.

And user save entry, show this error message.
User not authorized to edit content for this site.
Admin user can save draft and entry.
Occurs only when there is only one site.
I added one site and add permission for editing the site to none admin user , then the none admin user can save draft and create entry.
Steps to reproduce
- install 4.0.0-beta.1
- start PRO trial
- create a section
- create a new user not admin
- new user create entry
Additional info
- Craft version: Craft Pro 4.0.0-beta.1
- PHP version: 8.0.16
- Database driver & version: MySQL 10.3.34
- Plugins & versions: No plugins are enabled.
yii\web\ForbiddenHttpException: User not authorized to edit content for this site. in /home/swkbdufr/craft4-test/vendor/craftcms/cms/src/controllers/ElementsController.php:1490
Stack trace:
#0 /home/swkbdufr/craft4-test/vendor/craftcms/cms/src/controllers/ElementsController.php(1263): craft\controllers\ElementsController->_element()
#1 [internal function]: craft\controllers\ElementsController->actionApplyDraft()
#2 /home/swkbdufr/craft4-test/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#3 /home/swkbdufr/craft4-test/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array)
#4 /home/swkbdufr/craft4-test/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction('apply-draft', Array)
#5 /home/swkbdufr/craft4-test/vendor/craftcms/cms/src/web/Application.php(300): yii\base\Module->runAction('elements/apply-...', Array)
#6 /home/swkbdufr/craft4-test/vendor/craftcms/cms/src/web/Application.php(604): craft\web\Application->runAction('elements/apply-...', Array)
#7 /home/swkbdufr/craft4-test/vendor/craftcms/cms/src/web/Application.php(279): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#8 /home/swkbdufr/craft4-test/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest(Object(craft\web\Request))
#9 /home/swkbdufr/public_html/craft4-test/index.php(13): yii\base\Application->run()
#10 {main}