Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2019-10-21 03:06:30 +00:00
parent 5c43353f1b
commit 666acb10b4
6 changed files with 26 additions and 27 deletions

View file

@ -41,7 +41,7 @@ export const isValidDate = dateString => {
return true; return true;
} }
return false; return false;
} catch { } catch (e) {
return false; return false;
} }
}; };

View file

@ -68,11 +68,10 @@ Learn how to install, configure, update, and maintain your GitLab instance.
#### Customizing GitLab's appearance #### Customizing GitLab's appearance
- [Header logo](../customization/branded_page_and_email_header.md): Change the logo on all pages and email headers. - [Header logo](../user/admin_area/appearance.md#navigation-bar): Change the logo on all pages and email headers.
- [Favicon](../customization/favicon.md): Change the default favicon to your own logo. - [Favicon](../user/admin_area/appearance.md#favicon): Change the default favicon to your own logo.
- [Branded login page](../customization/branded_login_page.md): Customize the login page with your own logo, title, and description. - [Branded login page](../user/admin_area/appearance.md#sign-in--sign-up-pages): Customize the login page with your own logo, title, and description.
- [Welcome message](../customization/welcome_message.md): Add a custom welcome message to the sign-in page. - ["New Project" page](../user/admin_area/appearance.md#new-project-pages): Customize the text to be displayed on the page that opens whenever your users create a new project.
- ["New Project" page](../customization/new_project_page.md): Customize the text to be displayed on the page that opens whenever your users create a new project.
- [Additional custom email text](../user/admin_area/settings/email.md#custom-additional-text-premium-only): Add additional custom text to emails sent from GitLab. **(PREMIUM ONLY)** - [Additional custom email text](../user/admin_area/settings/email.md#custom-additional-text-premium-only): Add additional custom text to emails sent from GitLab. **(PREMIUM ONLY)**
### Maintaining GitLab ### Maintaining GitLab
@ -105,7 +104,7 @@ Learn how to install, configure, update, and maintain your GitLab instance.
## User settings and permissions ## User settings and permissions
- [Creating users](../user/profile/account/create_accounts.md): Create users manually or through authentication integrations. - [Creating users](../user/profile/account/create_accounts.md): Create users manually or through authentication integrations.
- [Libravatar](../customization/libravatar.md): Use Libravatar instead of Gravatar for user avatars. - [Libravatar](libravatar.md): Use Libravatar instead of Gravatar for user avatars.
- [Sign-up restrictions](../user/admin_area/settings/sign_up_restrictions.md): block email addresses of specific domains, or whitelist only specific domains. - [Sign-up restrictions](../user/admin_area/settings/sign_up_restrictions.md): block email addresses of specific domains, or whitelist only specific domains.
- [Access restrictions](../user/admin_area/settings/visibility_and_access_controls.md#enabled-git-access-protocols): Define which Git access protocols can be used to talk to GitLab (SSH, HTTP, HTTPS). - [Access restrictions](../user/admin_area/settings/visibility_and_access_controls.md#enabled-git-access-protocols): Define which Git access protocols can be used to talk to GitLab (SSH, HTTP, HTTPS).
- [Authentication and Authorization](auth/README.md): Configure external authentication with LDAP, SAML, CAS and additional providers. - [Authentication and Authorization](auth/README.md): Configure external authentication with LDAP, SAML, CAS and additional providers.

View file

@ -99,7 +99,7 @@ description: 'Learn how to contribute to GitLab.'
- [Post deployment migrations](post_deployment_migrations.md) - [Post deployment migrations](post_deployment_migrations.md)
- [Background migrations](background_migrations.md) - [Background migrations](background_migrations.md)
- [Swapping tables](swapping_tables.md) - [Swapping tables](swapping_tables.md)
- [Deleting exiting migrations](deleting_migrations.md) - [Deleting migrations](deleting_migrations.md)
### Best practices ### Best practices

View file

@ -1,6 +1,6 @@
# GitLab utilities # GitLab utilities
We developed a number of utilities to ease development. We have developed a number of utilities to help ease development:
## `MergeHash` ## `MergeHash`
@ -51,15 +51,15 @@ Refer to: <https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/utils/mer
Refer to <https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/utils/override.rb>: Refer to <https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/utils/override.rb>:
- This utility could help us check if a particular method would override - This utility can help you check if one method would override
another method or not. It has the same idea of Java's `@Override` annotation another or not. It is the same concept as Java's `@Override` annotation
or Scala's `override` keyword. However we only do this check when or Scala's `override` keyword. However, you should only do this check when
`ENV['STATIC_VERIFICATION']` is set to avoid production runtime overhead. `ENV['STATIC_VERIFICATION']` is set to avoid production runtime overhead.
This is useful to check: This is useful for checking:
- If we have typos in overriding methods. - If you have typos in overriding methods.
- If we renamed the overridden methods, making original overriding methods - If you renamed the overridden methods, which make the original override methods
overrides nothing. irrelevant.
Here's a simple example: Here's a simple example:
@ -100,11 +100,11 @@ Refer to <https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/utils/stro
- Memoize the value even if it is `nil` or `false`. - Memoize the value even if it is `nil` or `false`.
We often do `@value ||= compute`, however this doesn't work well if We often do `@value ||= compute`. However, this doesn't work well if
`compute` might eventually give `nil` and we don't want to compute again. `compute` might eventually give `nil` and you don't want to compute again.
Instead we could use `defined?` to check if the value is set or not. Instead you could use `defined?` to check if the value is set or not.
However it's tedious to write such pattern, and `StrongMemoize` would It's tedious to write such pattern, and `StrongMemoize` would
help us use such pattern. help you use such pattern.
Instead of writing patterns like this: Instead of writing patterns like this:
@ -118,7 +118,7 @@ Refer to <https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/utils/stro
end end
``` ```
We could write it like: You could write it like:
``` ruby ``` ruby
class Find class Find
@ -151,7 +151,7 @@ and the cache key would be based on the class name, method name,
optionally customized instance level values, optionally customized optionally customized instance level values, optionally customized
method level values, and optional method arguments. method level values, and optional method arguments.
A simple example that only uses the instance level customised values: A simple example that only uses the instance level customised values is:
``` ruby ``` ruby
class UserAccess class UserAccess
@ -169,8 +169,8 @@ end
This way, the result of `can_push_to_branch?` would be cached in This way, the result of `can_push_to_branch?` would be cached in
`RequestStore.store` based on the cache key. If `RequestStore` is not `RequestStore.store` based on the cache key. If `RequestStore` is not
currently active, then it would be stored in a hash saved in an currently active, then it would be stored in a hash, and saved in an
instance variable, so the cache logic would be the same. instance variable so the cache logic would be the same.
We can also set different strategies for different methods: We can also set different strategies for different methods:

View file

@ -183,7 +183,7 @@ sudo make prefix=/usr/local install
# When editing config/gitlab.yml (Step 5), change the git -> bin_path to /usr/local/bin/git # When editing config/gitlab.yml (Step 5), change the git -> bin_path to /usr/local/bin/git
``` ```
For the [Custom Favicon](../customization/favicon.md) to work, GraphicsMagick For the [Custom Favicon](../user/admin_area/appearance.md#favicon) to work, GraphicsMagick
needs to be installed. needs to be installed.
```sh ```sh

View file

@ -8,7 +8,7 @@ You can customize some of the content in emails sent from your GitLab instance.
## Custom logo ## Custom logo
The logo in the header of some emails can be customized, see the [logo customization section](../../../customization/branded_page_and_email_header.md). The logo in the header of some emails can be customized, see the [logo customization section](../appearance.md#navigation-bar).
## Custom additional text **(PREMIUM ONLY)** ## Custom additional text **(PREMIUM ONLY)**