Add rule for upload
Depends on permission to use links!
This commit is contained in:
parent
3aa0f27252
commit
a57dd75625
1 changed files with 12 additions and 0 deletions
|
@ -144,4 +144,16 @@ class Users extends Rules
|
|||
{
|
||||
return $this->user->isAdmin || 1 === $this->user->g_view_users;
|
||||
}
|
||||
|
||||
/**
|
||||
* Статус возможности использования загрузки файлов
|
||||
*/
|
||||
protected function getuseUpload(): bool
|
||||
{
|
||||
return 1 === $this->c->config->b_upload
|
||||
&& 1 === $this->user->g_post_links // ???? может быть локальные ссылки разрешить в постах?
|
||||
&& ! empty($this->user->g_up_ext)
|
||||
&& $this->user->g_up_size_kb > 0
|
||||
&& $this->user->g_up_limit_mb > 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue