mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Update feature flag for affiliations; use it in the router; minor style adjustments.
This commit is contained in:
parent
85cf518457
commit
a759828ece
5 changed files with 10 additions and 7 deletions
|
@ -21,6 +21,6 @@ module.exports = Features =
|
|||
when 'templates'
|
||||
return !Settings.overleaf?
|
||||
when 'affiliations'
|
||||
return !(Settings.ldap? or Settings.saml?)
|
||||
return settings?.apis?.v1?.url?
|
||||
else
|
||||
throw new Error("unknown feature: #{feature}")
|
||||
|
|
|
@ -116,7 +116,7 @@ module.exports = class Router
|
|||
webRouter.post '/user/emails/confirm',
|
||||
UserEmailsController.confirm
|
||||
|
||||
unless Features.externalAuthenticationSystemUsed()
|
||||
if Features.hasFeature 'affiliations'
|
||||
webRouter.post '/user/emails',
|
||||
AuthenticationController.requireLogin(),
|
||||
UserEmailsController.add
|
||||
|
|
|
@ -36,7 +36,7 @@ form.row(
|
|||
a(
|
||||
href
|
||||
ng-click="changeAffiliation(userEmail);"
|
||||
) #{translate("change")}
|
||||
) #{translate("change")}
|
||||
| )
|
||||
.affiliation-change-container(
|
||||
ng-if="isChangingAffiliation(userEmail.email)"
|
||||
|
@ -51,19 +51,19 @@ form.row(
|
|||
href
|
||||
ng-click="saveAffiliationChange();"
|
||||
) #{translate("save_or_cancel-save")}
|
||||
| #{translate("save_or_cancel-or" )}
|
||||
| #{translate("save_or_cancel-or" )}
|
||||
a(
|
||||
href
|
||||
ng-click="cancelAffiliationChange();"
|
||||
) #{translate("save_or_cancel-cancel")}
|
||||
td
|
||||
a(
|
||||
a.affiliations-table-inline-action(
|
||||
href
|
||||
ng-if="!userEmail.default"
|
||||
ng-click="setDefaultUserEmail(userEmail)"
|
||||
) #{translate("make_default")}
|
||||
br
|
||||
a(
|
||||
a.affiliations-table-inline-action(
|
||||
href
|
||||
ng-if="!userEmail.default"
|
||||
ng-click="removeUserEmail(userEmail)"
|
||||
|
|
|
@ -81,7 +81,7 @@ define [
|
|||
}
|
||||
|
||||
addRoleAndDepartment = (email, role, department) ->
|
||||
$http.post "/endorse", {
|
||||
$http.post "/user/emails/endorse", {
|
||||
email,
|
||||
role,
|
||||
department,
|
||||
|
|
|
@ -26,6 +26,9 @@
|
|||
.affiliations-table-inline-actions {
|
||||
width: 20%;
|
||||
}
|
||||
.affiliations-table-inline-action {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
.affiliations-table-highlighted-row {
|
||||
background-color: tint(@content-alt-bg-color, 6%);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue