feat(users): govern profiles and access

Normalize fixed profile fields, profile actions, and the five-column capability matrix for comments, uploads, and downloads.
This commit is contained in:
2026-08-13 00:24:54 +08:00
parent 0b06b2c7df
commit 8241570ca2
67 changed files with 780 additions and 1127 deletions
+1 -2
View File
@@ -149,8 +149,7 @@ if (!function_exists('aksrt_is_avatar_upload_enabled')) {
* Whether local avatar uploads are enabled by attachment policy.
*/
function aksrt_is_avatar_upload_enabled(): bool {
$settings = class_exists('\\AKSRT\\Settings\\Settings') ? \AKSRT\Settings\Settings::get_all() : [];
return !isset($settings['allow_avatar_upload']) || !empty($settings['allow_avatar_upload']);
return function_exists('aksrt_user_can') && aksrt_user_can('upload_avatar', get_current_user_id());
}
}