blob: 885993a122caf3f009d8bcd5be434d4d66a9b5aa [file] [log] [blame]
JouYoung Suhf29554a2022-04-07 17:00:29 -04001= gerrit check-project-access
2
3== NAME
4gerrit check-project-access - Check project readability of all users in a
5matching the given link:rest-api-accounts.html#account-id[account identifier]
6
7== SYNOPSIS
8[verse]
9--
10_ssh_ -p <port> <host> _gerrit check-project-access_
11 [--project <PROJECT> | -p <PROJECT>]
12 [--user <USER> | -u <USER>]
13--
14
15== DESCRIPTION
16Allow users to check if user has access to a project’s changes, comments, code
17differences, and Git access over SSH or HTTP.
18
19It returns all users in given input String, where it includes: username, email
20address and full name.
21
22== ACCESS
23Users who have view access and administrate server capability.
24
25== EXAMPLES
26Check if users can read all references in the repository called "test_project",
27in given input String TestUser.
28
29Given that there are
30a user with username "test_user1", email "one@email.com", and Full name as
31TestUser,
32a user with username "test_user2", email "two@email.com", and Full name as
33TestUser,
34a user with username "test_user3", email "TestUser@email.com", and Full name
35as John Doe
36
37----
38$ ssh -p @SSH_PORT@ @SSH_HOST@ gerrit check-project-access
39 -p test_project
40 -u TestUser
41
42Username: 'test_user1', Email: 'one@example.com', Full Name: 'TestUser'
43, Result: TRUE
44Username: 'test_user3', Email: 'TestUser@example.com', Full Name: 'John Doe'
45, Result: FALSE
46Username: 'test_user2', Email: 'two@example.com', Full Name: 'TestUser'
47, Result: FALSE
48----
49
50----
51$ ssh -p @SSH_PORT@ @SSH_HOST@ gerrit check-project-access
52 -p test_project_doesnt_exist
53 -u TestUser
54
55fatal: project 'test_project_doesnt_exist' is unavailable
56----
57
58----
59$ ssh -p @SSH_PORT@ @SSH_HOST@ gerrit check-project-access
60 -p test_project
61 -u test_user_doesnt_exist
62
63fatal: No accounts found for your query: "test_user_doesnt_exist"
64Tip: Try double-escaping spaces, for example: "--user Last,\\ First"
65----
66
67
68GERRIT
69------
70Part of link:index.html[Gerrit Code Review]
71
72SEARCHBOX
73---------
74