Provider::fillActions

  1. Bitrix24 API (v. 23.675.0)
  2. tasks
  3. Provider
  4. fillActions
  • Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/internals/project/provider.php
  • Класс: BitrixTasksInternalsProjectProvider
  • Вызов: Provider::fillActions
public function fillActions(array $projects): array
{
	foreach ($projects as $id => $project)
	{
		$permissions = SocialNetworkGroup::getUserPermissionsInGroup($id);

		$projects[$id]['ACTIONS'] = [
			'EDIT' => $permissions['UserCanModifyGroup'],
			'DELETE' => $permissions['UserCanModifyGroup'],
			'INVITE' => $permissions['UserCanInitiate'],
			'JOIN' => !$permissions['UserIsMember'] && !$permissions['UserRole'],
			'LEAVE' => $permissions['UserIsMember'] && !$permissions['UserIsAutoMember'] && !$permissions['UserIsOwner'],
		];
	}

	return $projects;
}

Добавить комментарий