Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rocket.Chat
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RocketChat
Rocket.Chat
Commits
ca50f0fb
Unverified
Commit
ca50f0fb
authored
2 years ago
by
Hugo Costa
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Regression: Remove 4.0 version banner (#26251)
Co-authored-by:
Diego Sampaio
<
chinello@gmail.com
>
parent
35b9384a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
Loading
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/meteor/server/startup/migrations/index.ts
+1
-0
1 addition, 0 deletions
apps/meteor/server/startup/migrations/index.ts
apps/meteor/server/startup/migrations/v278.ts
+38
-0
38 additions, 0 deletions
apps/meteor/server/startup/migrations/v278.ts
with
39 additions
and
0 deletions
apps/meteor/server/startup/migrations/index.ts
+
1
−
0
View file @
ca50f0fb
...
...
@@ -36,4 +36,5 @@ import './v274';
import
'
./v275
'
;
import
'
./v276
'
;
import
'
./v277
'
;
import
'
./v278
'
;
import
'
./xrun
'
;
This diff is collapsed.
Click to expand it.
apps/meteor/server/startup/migrations/v278.ts
0 → 100644
+
38
−
0
View file @
ca50f0fb
import
{
Banners
,
Settings
}
from
'
@rocket.chat/models
'
;
import
{
addMigration
}
from
'
../../lib/migrations
'
;
import
{
isEnterprise
}
from
'
../../../ee/app/license/server
'
;
import
{
settings
}
from
'
../../../app/settings/server
'
;
addMigration
({
version
:
278
,
async
up
()
{
const
query
=
{
_id
:
{
$in
:
[
/^Accounts_OAuth_Custom-
?([^
-_
]
+
)
$/
]
},
value
:
true
,
};
const
isCustomOAuthEnabled
=
!!
(
await
Settings
.
findOne
(
query
));
const
LDAPEnabled
=
settings
.
get
(
'
LDAP_Enable
'
);
const
SAMLEnabled
=
settings
.
get
(
'
SAML_Custom_Default
'
);
const
isEE
=
isEnterprise
();
if
(
!
isEE
&&
(
isCustomOAuthEnabled
||
LDAPEnabled
||
SAMLEnabled
))
{
return
;
}
await
Banners
.
updateOne
(
{
'
view.blocks.0.text.text
'
:
/
authentication
\
-
changes
/
,
'
active
'
:
{
$ne
:
false
},
},
{
$set
:
{
active
:
false
,
inactivedAt
:
new
Date
(),
},
},
);
},
});
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment