JouYoung Suh | f29554a | 2022-04-07 17:00:29 -0400 | [diff] [blame] | 1 | = gerrit check-project-access |
| 2 | |
| 3 | == NAME |
| 4 | gerrit check-project-access - Check project readability of all users in a |
| 5 | matching 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 |
| 16 | Allow users to check if user has access to a project’s changes, comments, code |
| 17 | differences, and Git access over SSH or HTTP. |
| 18 | |
| 19 | It returns all users in given input String, where it includes: username, email |
| 20 | address and full name. |
| 21 | |
| 22 | == ACCESS |
| 23 | Users who have view access and administrate server capability. |
| 24 | |
| 25 | == EXAMPLES |
| 26 | Check if users can read all references in the repository called "test_project", |
| 27 | in given input String TestUser. |
| 28 | |
| 29 | Given that there are |
| 30 | a user with username "test_user1", email "one@email.com", and Full name as |
| 31 | TestUser, |
| 32 | a user with username "test_user2", email "two@email.com", and Full name as |
| 33 | TestUser, |
| 34 | a user with username "test_user3", email "TestUser@email.com", and Full name |
| 35 | as John Doe |
| 36 | |
| 37 | ---- |
| 38 | $ ssh -p @SSH_PORT@ @SSH_HOST@ gerrit check-project-access |
| 39 | -p test_project |
| 40 | -u TestUser |
| 41 | |
| 42 | Username: 'test_user1', Email: 'one@example.com', Full Name: 'TestUser' |
| 43 | , Result: TRUE |
| 44 | Username: 'test_user3', Email: 'TestUser@example.com', Full Name: 'John Doe' |
| 45 | , Result: FALSE |
| 46 | Username: '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 | |
| 55 | fatal: 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 | |
| 63 | fatal: No accounts found for your query: "test_user_doesnt_exist" |
| 64 | Tip: Try double-escaping spaces, for example: "--user Last,\\ First" |
| 65 | ---- |
| 66 | |
| 67 | |
| 68 | GERRIT |
| 69 | ------ |
| 70 | Part of link:index.html[Gerrit Code Review] |
| 71 | |
| 72 | SEARCHBOX |
| 73 | --------- |
| 74 | |