Merge remote-tracking branch 'origin/stable15' into stable15

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
This commit is contained in:
Maxence Lange 2019-07-01 09:42:27 -01:00
commit 6fb39a4b3e
8 changed files with 75 additions and 4 deletions

View file

@ -227,7 +227,7 @@ OC.L10N.register(
"Creation" : "Creación",
"A personal circle is a list of users known only to the owner." : "Un círculo persoal é unha lista de usuarios que só é coñecida polo propietario.",
"This is the right option if you want to do recurrent sharing with the same list of local users." : "Esta é a opción indicada se quere compartir frecuentemente coa mesma lista de usuarios locais.",
"A secret circle is an hidden group that can only be seen by its members or by people knowing the exact name of the circle." : "Un círculo secreto é un grupo agachado que só pode ser visto polos seus membros ou persoas que coñecen o nome exacto do círculo.",
"A secret circle is an hidden group that can only be seen by its members or by people knowing the exact name of the circle." : "Un círculo secreto é un grupo agochado que só pode ser visto polos seus membros ou persoas que coñecen o nome exacto do círculo.",
"Non-members won't be able to find your secret circle using the search bar." : "Quen non sexa membro non poderá atopar o seu círculo secreto usando a barra de busca.",
"Joining a closed circle requires an invitation or confirmation by a moderator." : "Unirse a un círculo pechado require un convite ou confirmación por parte dun moderador.",
"Anyone can find and request an invitation to the circle; but only members will see who\\'s in it and get access to it\\'s shared items." : "Calquera pode atopar e solicitar un convite ao círculo; mais só os membros verán quen está nel e acceder aos seus elementos compartidos.",

View file

@ -225,7 +225,7 @@
"Creation" : "Creación",
"A personal circle is a list of users known only to the owner." : "Un círculo persoal é unha lista de usuarios que só é coñecida polo propietario.",
"This is the right option if you want to do recurrent sharing with the same list of local users." : "Esta é a opción indicada se quere compartir frecuentemente coa mesma lista de usuarios locais.",
"A secret circle is an hidden group that can only be seen by its members or by people knowing the exact name of the circle." : "Un círculo secreto é un grupo agachado que só pode ser visto polos seus membros ou persoas que coñecen o nome exacto do círculo.",
"A secret circle is an hidden group that can only be seen by its members or by people knowing the exact name of the circle." : "Un círculo secreto é un grupo agochado que só pode ser visto polos seus membros ou persoas que coñecen o nome exacto do círculo.",
"Non-members won't be able to find your secret circle using the search bar." : "Quen non sexa membro non poderá atopar o seu círculo secreto usando a barra de busca.",
"Joining a closed circle requires an invitation or confirmation by a moderator." : "Unirse a un círculo pechado require un convite ou confirmación por parte dun moderador.",
"Anyone can find and request an invitation to the circle; but only members will see who\\'s in it and get access to it\\'s shared items." : "Calquera pode atopar e solicitar un convite ao círculo; mais só os membros verán quen está nel e acceder aos seus elementos compartidos.",

View file

@ -211,6 +211,8 @@ OC.L10N.register(
"Email format is not valid" : "이메일 주소가 올바르지 않음",
"This contact is not available" : "이 연락처를 사용할 수 없음",
"Could not find share" : "공유를 찾을 수 없음",
"Bring cloud-users closer together." : "클라우드 사용자를 더 가깝게 연결합니다.",
"Circles allows your users to create their own groups of users/colleagues/friends.\nThose groups of users (or 'circles') can then be used by any other app for sharing purpose (files, social feed, status update, messaging, ...).\n\nDifferent type of circles can be created:\n\n- A personal circle is a list of users known only to the owner.\nThis is the right option if you want to do recurrent sharing with the same group of people.\n\n- A public circle is an open group visible to anyone willing to join.\nYour circle will be visible to everyone and everyone will be able to join the circle.\n\n- A closed circle requires invitation or confirmation by an admin.\nThis is the right circle if you are looking for privacy when sharing your files or ideas.\n\n- An Secret circle is an open group that can be protected by a password.\nUsers won't be able to find this Circle using Nextcloud search engine." : "서클을 사용하여 각 사용자들이 그룹을 직접 만들 수 있습니다.\n해당 서클은 다른 앱에서 공유 대상으로 설정할 수 있습니다(파일, 소셜 피드, 상태 업데이트, 메시징 등).\n\n다음 서클 형식을 사용할 수 있습니다:\n\n- 개인 서클은 소유자만 회원 목록을 알 수 있습니다.\n같은 사람들에게 내용을 자주 공유할 때 적합합니다.\n\n- 공개 서클은 누구나 등록할 수 있는 공개 그룹입니다.\n모든 사람이 서클을 볼 수 있으며 모든 사람이 가입할 수 있습니다.\n\n- 닫힌 서클은 관리자의 확인이나 초대장이 필요한 서클입니다.\n파일이나 아이디어를 공유할 때 프라이버시가 필요할 때 적합합니다.\n\n- 비밀 서클은 암호로 보호된 공개 그룹입니다.\nNextcloud 검색 엔진으로 이 서클을 찾을 수 없습니다.",
"No files in here" : "여기에 파일 없음",
"No entries found in this folder" : "이 폴더에서 항목을 찾을 수 없음",
"Name" : "이름",
@ -241,6 +243,7 @@ OC.L10N.register(
"Circles you belong to" : "내가 속한 서클",
"Circles you own" : "내가 소유한 서클",
"No circle selected" : "서클을 선택하지 않았음",
"Settings" : "설정",
"Pending invitation to join this circle" : "대기 중인 서클 가입 초대장",
"You have a pending request to join this circle" : "이 서클 가입 요청이 대기 중입니다",
"Add a member" : "회원 추가",
@ -261,12 +264,17 @@ OC.L10N.register(
"Group Name" : "그룹 이름",
"Link" : "연결",
"Linked" : "연결됨",
"Members limit" : "회원 제한",
"Change the limit to the number of members. (0: default, -1: unlimited)" : "서클 회원 수를 제한할 수 있습니다(0: 기본값, -1: 무제한).",
"Allow Federated Links" : "연합 연결 허용",
"Makes the circle federated, and enables sharing between federated circles" : "서클을 연합 상태로 만들고 연합 서클 간 공유 활성화",
"Accept Link Request Automatically" : "연결 요청 자동으로 수락",
"Warning: Enabling this will automatically accept new link requests from other circles." : "경고: 이 설정을 사용하면 다른 서클의 연결 요청을 자동으로 수락합니다.",
"Save settings" : "설정 저장",
"Maximum number of members per circle" : "서클당 최대 회원 수",
"Allow linking of groups" : "그룹 링크 허용",
"Groups can be linked to circles." : "그룹을 서클에 연결할 수 있습니다.",
"Allow federated circles" : "연합 서클 허용",
"Circles from different Nextclouds can be linked together." : "다른 Nextcloud의 서클을 연결할 수 있습니다."
},
"nplurals=1; plural=0;");

View file

@ -209,6 +209,8 @@
"Email format is not valid" : "이메일 주소가 올바르지 않음",
"This contact is not available" : "이 연락처를 사용할 수 없음",
"Could not find share" : "공유를 찾을 수 없음",
"Bring cloud-users closer together." : "클라우드 사용자를 더 가깝게 연결합니다.",
"Circles allows your users to create their own groups of users/colleagues/friends.\nThose groups of users (or 'circles') can then be used by any other app for sharing purpose (files, social feed, status update, messaging, ...).\n\nDifferent type of circles can be created:\n\n- A personal circle is a list of users known only to the owner.\nThis is the right option if you want to do recurrent sharing with the same group of people.\n\n- A public circle is an open group visible to anyone willing to join.\nYour circle will be visible to everyone and everyone will be able to join the circle.\n\n- A closed circle requires invitation or confirmation by an admin.\nThis is the right circle if you are looking for privacy when sharing your files or ideas.\n\n- An Secret circle is an open group that can be protected by a password.\nUsers won't be able to find this Circle using Nextcloud search engine." : "서클을 사용하여 각 사용자들이 그룹을 직접 만들 수 있습니다.\n해당 서클은 다른 앱에서 공유 대상으로 설정할 수 있습니다(파일, 소셜 피드, 상태 업데이트, 메시징 등).\n\n다음 서클 형식을 사용할 수 있습니다:\n\n- 개인 서클은 소유자만 회원 목록을 알 수 있습니다.\n같은 사람들에게 내용을 자주 공유할 때 적합합니다.\n\n- 공개 서클은 누구나 등록할 수 있는 공개 그룹입니다.\n모든 사람이 서클을 볼 수 있으며 모든 사람이 가입할 수 있습니다.\n\n- 닫힌 서클은 관리자의 확인이나 초대장이 필요한 서클입니다.\n파일이나 아이디어를 공유할 때 프라이버시가 필요할 때 적합합니다.\n\n- 비밀 서클은 암호로 보호된 공개 그룹입니다.\nNextcloud 검색 엔진으로 이 서클을 찾을 수 없습니다.",
"No files in here" : "여기에 파일 없음",
"No entries found in this folder" : "이 폴더에서 항목을 찾을 수 없음",
"Name" : "이름",
@ -239,6 +241,7 @@
"Circles you belong to" : "내가 속한 서클",
"Circles you own" : "내가 소유한 서클",
"No circle selected" : "서클을 선택하지 않았음",
"Settings" : "설정",
"Pending invitation to join this circle" : "대기 중인 서클 가입 초대장",
"You have a pending request to join this circle" : "이 서클 가입 요청이 대기 중입니다",
"Add a member" : "회원 추가",
@ -259,12 +262,17 @@
"Group Name" : "그룹 이름",
"Link" : "연결",
"Linked" : "연결됨",
"Members limit" : "회원 제한",
"Change the limit to the number of members. (0: default, -1: unlimited)" : "서클 회원 수를 제한할 수 있습니다(0: 기본값, -1: 무제한).",
"Allow Federated Links" : "연합 연결 허용",
"Makes the circle federated, and enables sharing between federated circles" : "서클을 연합 상태로 만들고 연합 서클 간 공유 활성화",
"Accept Link Request Automatically" : "연결 요청 자동으로 수락",
"Warning: Enabling this will automatically accept new link requests from other circles." : "경고: 이 설정을 사용하면 다른 서클의 연결 요청을 자동으로 수락합니다.",
"Save settings" : "설정 저장",
"Maximum number of members per circle" : "서클당 최대 회원 수",
"Allow linking of groups" : "그룹 링크 허용",
"Groups can be linked to circles." : "그룹을 서클에 연결할 수 있습니다.",
"Allow federated circles" : "연합 서클 허용",
"Circles from different Nextclouds can be linked together." : "다른 Nextcloud의 서클을 연결할 수 있습니다."
},"pluralForm" :"nplurals=1; plural=0;"
}

View file

@ -81,6 +81,8 @@ OC.L10N.register(
"{member} accepted the invitation to join {circle}" : "{member} priėmė pakvietimą prisijungti prie {circle}",
"You added {member} as member to {circle}" : "Jūs pridėjote {member} kaip narį į {circle}",
"You have been added as member to {circle} by {author}" : "{author} pridėjo jus kaip narį į {circle}",
"You added {external} to {circle}" : "Jūs pridėjote {external} į {circle}",
"{external} has been added to {circle} by {author}" : "{author} pridėjo {external} į {circle}",
"You left {circle}" : "Jūs išėjote iš {circle}",
"{member} left {circle}" : "{member} išėjo iš {circle}",
"You declined the invitation to join {circle}" : "Jūs atmetėte pakvietimą prisijungti prie {circle}",
@ -93,6 +95,8 @@ OC.L10N.register(
"You invited {member} to join {circle}" : "Jūs pakvietėte {member} prisijungti prie {circle}",
"You have been invited to join {circle} by {author}" : "{author} pakvietė jus prisijungti prie {circle}",
"{member} has been invited to join {circle} by {author}" : "{author} pakvietė {member} prisijungti prie {circle}",
"You sent a request to join {circle}" : "Jūs išsiuntėte užklausą prisijungti prie {circle}",
"{member} sent a request to join {circle}" : "{member} išsiuntė užklausą prisijungti prie {circle}",
"You are the new owner of {circle}" : "Jūs esate rato {circle} savininkas",
"{member} is the new owner of {circle}" : "{member} yra naujas rato {circle} savininkas",
"%s shared »%s« with you." : "%s pradėjo bendrinti »%s« su jumis.",
@ -117,6 +121,7 @@ OC.L10N.register(
"You cannot create this type of circle" : "Jūs negalite sukurti šio tipo ratą",
"You cannot display this type of circle" : "Jūs negalite rodyti šio tipo ratą",
"This member is not the owner of the circle" : "Šis narys nėra rato savininkas",
"This member is not an admin of the circle" : "Šis narys nėra rato administratorius",
"Federated link does not have a valid format" : "Federacinė nuoroda nėra tinkamo formato",
"Federated circles are not allowed on the remote Nextcloud" : "Federaciniai ratai nėra leidžiami nuotoliniame Nextcloud",
"This link exists already" : "Ši nuoroda jau yra",
@ -125,6 +130,7 @@ OC.L10N.register(
"This group is already linked to the circle" : "Ši grupė jau yra susieta su ratu",
"Group cannot be set as owner of a circle" : "Grupė negali būti nustatyta kaip rato savininkė",
"This user does not exist" : "Šio naudotojo nėra",
"Email format is not valid" : "Neteisingas el. pašto formatas",
"This contact is not available" : "Šis adresatas yra neprieinamas",
"Could not find share" : "Nepavyko rasti viešinio",
"No files in here" : "Čia failų nėra",
@ -155,6 +161,7 @@ OC.L10N.register(
"Status" : "Būsena",
"Group Name" : "Grupės pavadinimas",
"Save settings" : "Įrašyti nustatymus",
"Maximum number of members per circle" : "Didžiausias narių skaičius viename rate",
"Allow linking of groups" : "Leisti grupių susiejimą",
"Groups can be linked to circles." : "Grupės gali būti susietos su ratais.",
"Allow federated circles" : "Leisti federacinius ratus",

View file

@ -79,6 +79,8 @@
"{member} accepted the invitation to join {circle}" : "{member} priėmė pakvietimą prisijungti prie {circle}",
"You added {member} as member to {circle}" : "Jūs pridėjote {member} kaip narį į {circle}",
"You have been added as member to {circle} by {author}" : "{author} pridėjo jus kaip narį į {circle}",
"You added {external} to {circle}" : "Jūs pridėjote {external} į {circle}",
"{external} has been added to {circle} by {author}" : "{author} pridėjo {external} į {circle}",
"You left {circle}" : "Jūs išėjote iš {circle}",
"{member} left {circle}" : "{member} išėjo iš {circle}",
"You declined the invitation to join {circle}" : "Jūs atmetėte pakvietimą prisijungti prie {circle}",
@ -91,6 +93,8 @@
"You invited {member} to join {circle}" : "Jūs pakvietėte {member} prisijungti prie {circle}",
"You have been invited to join {circle} by {author}" : "{author} pakvietė jus prisijungti prie {circle}",
"{member} has been invited to join {circle} by {author}" : "{author} pakvietė {member} prisijungti prie {circle}",
"You sent a request to join {circle}" : "Jūs išsiuntėte užklausą prisijungti prie {circle}",
"{member} sent a request to join {circle}" : "{member} išsiuntė užklausą prisijungti prie {circle}",
"You are the new owner of {circle}" : "Jūs esate rato {circle} savininkas",
"{member} is the new owner of {circle}" : "{member} yra naujas rato {circle} savininkas",
"%s shared »%s« with you." : "%s pradėjo bendrinti »%s« su jumis.",
@ -115,6 +119,7 @@
"You cannot create this type of circle" : "Jūs negalite sukurti šio tipo ratą",
"You cannot display this type of circle" : "Jūs negalite rodyti šio tipo ratą",
"This member is not the owner of the circle" : "Šis narys nėra rato savininkas",
"This member is not an admin of the circle" : "Šis narys nėra rato administratorius",
"Federated link does not have a valid format" : "Federacinė nuoroda nėra tinkamo formato",
"Federated circles are not allowed on the remote Nextcloud" : "Federaciniai ratai nėra leidžiami nuotoliniame Nextcloud",
"This link exists already" : "Ši nuoroda jau yra",
@ -123,6 +128,7 @@
"This group is already linked to the circle" : "Ši grupė jau yra susieta su ratu",
"Group cannot be set as owner of a circle" : "Grupė negali būti nustatyta kaip rato savininkė",
"This user does not exist" : "Šio naudotojo nėra",
"Email format is not valid" : "Neteisingas el. pašto formatas",
"This contact is not available" : "Šis adresatas yra neprieinamas",
"Could not find share" : "Nepavyko rasti viešinio",
"No files in here" : "Čia failų nėra",
@ -153,6 +159,7 @@
"Status" : "Būsena",
"Group Name" : "Grupės pavadinimas",
"Save settings" : "Įrašyti nustatymus",
"Maximum number of members per circle" : "Didžiausias narių skaičius viename rate",
"Allow linking of groups" : "Leisti grupių susiejimą",
"Groups can be linked to circles." : "Grupės gali būti susietos su ratais.",
"Allow federated circles" : "Leisti federacinius ratus",

View file

@ -27,6 +27,7 @@
namespace OCA\Circles\Controller;
use OCA\Circles\Model\Member;
use OCA\Circles\Model\SearchResult;
use OCA\Circles\Service\MiscService;
use OCP\AppFramework\Http\DataResponse;
@ -173,6 +174,16 @@ class MembersController extends BaseController {
);
}
if ($this->configService->getAppValue('shareapi_allow_share_dialog_user_enumeration') !== 'yes') {
$result = array_filter(
$result,
function($data, $k) use ($search) {
/** @var SearchResult $data */
return $data->getIdent() === $search;
}, ARRAY_FILTER_USE_BOTH
);
}
return $this->success(['search' => $search, 'result' => $result]);
}

View file

@ -38,6 +38,7 @@ use OCA\Circles\Model\Circle;
use OCA\Circles\Model\Member;
use OCP\IGroupManager;
use OCP\IL10N;
use OCP\IUserManager;
class GroupsService {
@ -50,6 +51,9 @@ class GroupsService {
/** @var IGroupManager */
private $groupManager;
/** @var IUserManager */
private $userManager;
/** @var CirclesRequest */
private $circlesRequest;
@ -71,6 +75,7 @@ class GroupsService {
* @param string $userId
* @param IL10N $l10n
* @param IGroupManager $groupManager
* @param IUserManager $userManager
* @param CirclesRequest $circlesRequest
* @param MembersRequest $membersRequest
* @param CirclesService $circlesService
@ -78,13 +83,15 @@ class GroupsService {
* @param MiscService $miscService
*/
public function __construct(
$userId, IL10N $l10n, IGroupManager $groupManager, CirclesRequest $circlesRequest,
$userId, IL10N $l10n, IGroupManager $groupManager, IUserManager $userManager,
CirclesRequest $circlesRequest,
MembersRequest $membersRequest, CirclesService $circlesService,
EventsService $eventsService, MiscService $miscService
) {
$this->userId = $userId;
$this->l10n = $l10n;
$this->groupManager = $groupManager;
$this->userManager = $userManager;
$this->circlesRequest = $circlesRequest;
$this->membersRequest = $membersRequest;
$this->circlesService = $circlesService;
@ -106,6 +113,29 @@ class GroupsService {
$circle = $this->circlesRequest->getCircle($circleUniqueId, $this->userId);
$this->circlesService->hasToBeAdmin($circle->getHigherViewer());
$allMembers =
$this->membersRequest->forceGetMembers($circleUniqueId, Member::LEVEL_MEMBER, true);
$group = $this->groupManager->get($groupId);
$count = $group->count();
foreach ($allMembers as $member) {
if ($member->getType() !== Member::TYPE_USER) {
continue;
}
$user = $this->userManager->get($member->getUserId());
if ($group->inGroup($user)) {
continue;
}
$count++;
}
if ($count > $circle->getSetting('members_limit')) {
throw new \Exception('Group contains too many members');
}
$group = $this->getFreshNewMember($circleUniqueId, $groupId);
} catch (\Exception $e) {
throw $e;
@ -261,4 +291,4 @@ class GroupsService {
}
}
}