diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-12-19 23:53:19 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-12-19 23:56:21 +0100 |
commit | 34295036e2a9ecf18ca5440a5dd6dbb0c7f05643 (patch) | |
tree | a529cbc332882305520c7650cbe860301e12abb8 /lib/mattermost/session.rb | |
parent | 921f411a41d92ff6b3fdea2560adbd861d97be57 (diff) | |
download | gitlab-ce-34295036e2a9ecf18ca5440a5dd6dbb0c7f05643.tar.gz |
Improve sources
- Add proper error handling,
- Use flash[:alert] and flash[:notice],
- Use `resource` instead of `resources`,
Diffstat (limited to 'lib/mattermost/session.rb')
-rw-r--r-- | lib/mattermost/session.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/mattermost/session.rb b/lib/mattermost/session.rb index 670f83bb6bc..f0ce51d6a71 100644 --- a/lib/mattermost/session.rb +++ b/lib/mattermost/session.rb @@ -1,5 +1,10 @@ module Mattermost - class NoSessionError < StandardError; end + class NoSessionError < StandardError + def message + 'No session could be set up, is Mattermost configured with Single Sign on?' + end + end + # This class' prime objective is to obtain a session token on a Mattermost # instance with SSO configured where this GitLab instance is the provider. # |