You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by om...@apache.org on 2019/02/26 16:29:08 UTC

[incubator-dlab] branch EPMCDLAB-1186 updated: added enabling npm realm

This is an automated email from the ASF dual-hosted git repository.

omartushevskyi pushed a commit to branch EPMCDLAB-1186
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git


The following commit(s) were added to refs/heads/EPMCDLAB-1186 by this push:
     new 2ed86f1  added enabling npm realm
2ed86f1 is described below

commit 2ed86f122893fb22fe1ac408204a01f3dd1276c3
Author: Oleh Martushevskyi <Ol...@epam.com>
AuthorDate: Tue Feb 26 18:28:07 2019 +0200

    added enabling npm realm
---
 .../scripts/deploy_repository/templates/configureNexus.groovy          | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/infrastructure-provisioning/scripts/deploy_repository/templates/configureNexus.groovy b/infrastructure-provisioning/scripts/deploy_repository/templates/configureNexus.groovy
index f284f25..83082b5 100644
--- a/infrastructure-provisioning/scripts/deploy_repository/templates/configureNexus.groovy
+++ b/infrastructure-provisioning/scripts/deploy_repository/templates/configureNexus.groovy
@@ -9,6 +9,7 @@ import org.sonatype.nexus.ldap.persist.entity.*
 import org.sonatype.nexus.scheduling.TaskScheduler
 import org.sonatype.nexus.scheduling.schedule.Daily
 import org.sonatype.nexus.scheduling.schedule.Hourly
+import org.sonatype.nexus.security.realm.RealmManager
 
 def securitySystem = container.lookup(SecuritySystem.class.name)
 def authorizationManager = securitySystem.getAuthorizationManager('default')
@@ -57,4 +58,6 @@ security.addUser("SERVICE_USER_NAME",
 
 security.securitySystem.changePassword('admin','ADMIN_PASSWORD')
 security.setAnonymousAccess(false)
+realmManager = container.lookup(RealmManager.class.getName())
+realmManager.enableRealm("NpmToken", true)
 log.info('Script completed successfully')


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org