Show the git sync modal to read-only users (#15301)

GitOrigin-RevId: e002815fa7c18d497260e6344a4e8de95d7bacef
This commit is contained in:
Alf Eaton 2023-11-07 11:52:49 +00:00 committed by Copybot
parent 3912de589f
commit e0c8eb98c1
3 changed files with 6 additions and 2 deletions

View file

@ -834,10 +834,12 @@ const ProjectController = {
!userHasInstitutionLicence
const showPersonalAccessToken =
!Features.hasFeature('saas') ||
req.query?.personal_access_token === 'true'
userId &&
(!Features.hasFeature('saas') ||
req.query?.personal_access_token === 'true')
const optionalPersonalAccessToken =
userId &&
!showPersonalAccessToken &&
personalAccessTokenAssignment.variant === 'enabled' // `?personal-access-token=enabled`

View file

@ -413,6 +413,7 @@
"git_bridge_modal_description": "",
"git_bridge_modal_enter_authentication_token": "",
"git_bridge_modal_git_authentication_tokens": "",
"git_bridge_modal_read_only": "",
"git_bridge_modal_see_once": "",
"git_bridge_modal_tokens_description": "",
"git_bridge_modal_use_previous_token": "",

View file

@ -664,6 +664,7 @@
"git_bridge_modal_description": "You can git clone your project using the link displayed below.",
"git_bridge_modal_enter_authentication_token": "When prompted for a password, enter your new authentication token:",
"git_bridge_modal_git_authentication_tokens": "Git authentication tokens",
"git_bridge_modal_read_only": "<strong>You have read-only access to this project.</strong> This means you can pull from __appName__ but you cant push any changes you make back to this project.",
"git_bridge_modal_see_once": "Youll only see this token once. To delete it or generate a new one, visit Account Settings. For detailed instructions and troubleshooting, read our <0>help page</0>.",
"git_bridge_modal_tokens_description": "To git clone your project youll need the link below and a Git authentication token.",
"git_bridge_modal_use_previous_token": "If youre prompted for a password, you can use a previously generated Git authentication token. Or you can generate a new one in Account Settings. For more support, read our <0>help page</0>.",