You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Developer manual: fix the attribute and CSP examples in controllers.rst #15679
Two code examples in developer_manual/basics/controllers.rst don't work as written, and one attribute is missing from the list.
Attributes example (around line 909): imports PublicPage but uses #[NoAdminRequired]. Import OCP\AppFramework\Http\Attribute\NoAdminRequired (and drop the unused import).
CSP example (around line 1153): $csp->addAllowedImageDomain('*'); ends with ;, so the next ->addAllowedMediaDomain('*'); is a syntax error, and index() never returns $response. Fix the chain and add return $response;.
Add #[PasswordConfirmationRequired] to the list of controller attributes, with a one-line explanation.
Two code examples in
developer_manual/basics/controllers.rstdon't work as written, and one attribute is missing from the list.PublicPagebut uses#[NoAdminRequired]. ImportOCP\AppFramework\Http\Attribute\NoAdminRequired(and drop the unused import).$csp->addAllowedImageDomain('*');ends with;, so the next->addAllowedMediaDomain('*');is a syntax error, andindex()never returns$response. Fix the chain and addreturn $response;.#[PasswordConfirmationRequired]to the list of controller attributes, with a one-line explanation.