[ANN] Nexus Crowd Plugin Released

View: New views
16 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 | Next >

Re: including a js in index.html

by Max Powers :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sure you can do that, you simply need to replace the loginHandler method as follows in your javascript

Sonatype.repoServer.RepoServer.loginHandler = function (){

"your code here"

};



That ought to do it, note that the Sonatype.repoServer.RepoServer object is a singleton, so you can't use extjs to extend it, you will need to also copy in all code from that method that you still want to keep.

Keep us posted

Thanks

Max

On Sun, Feb 15, 2009 at 11:35 AM, dtanner <dtanner@...> wrote:

Thanks for the links, I have the js working.  That was easy.

 

I have one more question.  I would like to modify the behavior of the "Log In" button on the "server tab".  Ideally what I would like to do is to over-ride the "loginHandler" function in the repoServer.RepoServer.js and replace "loginHandler" with my custom handler.  Is this possible to do?

 

If this is not possible, what are possible alternatives?

 

Thanks,

 

 

David Tanner

Massachusetts Institute of Technology

Information Services and Technology

W92-144

dtanner@...

617-253-0110

 


From: Max Powers [mailto:mpowers@...]
Sent: Sunday, February 15, 2009 10:40 AM
To: nexus-dev@...
Subject: Re: [nexus-dev] including a js in index.html

 

In addition to that, this page shows how to add menu items to the left navigation

 

 

Max

On Sun, Feb 15, 2009 at 10:38 AM, Max Powers <mpowers@...> wrote:

Hi David, please see the plugin wiki page

 

 

Hope that helps out

 

Max

On Sun, Feb 15, 2009 at 10:07 AM, dtanner <dtanner@...> wrote:

I'm writing a plug-in and I need to include a js in index.html (index.vm).
I noticed that there is a mechanism to allow this to happen
($pluginPostHeadContribution or $pluginPreHeadContributions).  However, I
cannot find and examples or documentation that shows how this is implemented
via a plug-in.

Can anyone give me some guidance on how to do this?

Thanks

David Tanner
Massachusetts Institute of Technology
Information Services and Technology
W92-144
dtanner@...
617-253-0110



---------------------------------------------------------------------
To unsubscribe, e-mail: nexus-dev-unsubscribe@...
For additional commands, e-mail: nexus-dev-help@...

 

 



RE: including a js in index.html

by dtanner-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

I there anyway to do this through a plug-in?

 

David Tanner

Massachusetts Institute of Technology

Information Services and Technology

W92-144

dtanner@...

617-253-0110

 


From: Max Powers [mailto:mpowers@...]
Sent: Sunday, February 15, 2009 12:33 PM
To: nexus-dev@...
Subject: Re: [nexus-dev] including a js in index.html

 

Sure you can do that, you simply need to replace the loginHandler method as follows in your javascript

Sonatype.repoServer.RepoServer.loginHandler = function (){

"your code here"

};



That ought to do it, note that the Sonatype.repoServer.RepoServer object is a singleton, so you can't use extjs to extend it, you will need to also copy in all code from that method that you still want to keep.

Keep us posted

Thanks

Max

On Sun, Feb 15, 2009 at 11:35 AM, dtanner <dtanner@...> wrote:

Thanks for the links, I have the js working.  That was easy.

 

I have one more question.  I would like to modify the behavior of the "Log In" button on the "server tab".  Ideally what I would like to do is to over-ride the "loginHandler" function in the repoServer.RepoServer.js and replace "loginHandler" with my custom handler.  Is this possible to do?

 

If this is not possible, what are possible alternatives?

 

Thanks,

 

 

David Tanner

Massachusetts Institute of Technology

Information Services and Technology

W92-144

dtanner@...

617-253-0110

 


From: Max Powers [mailto:mpowers@...]
Sent: Sunday, February 15, 2009 10:40 AM
To: nexus-dev@...
Subject: Re: [nexus-dev] including a js in index.html

 

In addition to that, this page shows how to add menu items to the left navigation

 

 

Max

On Sun, Feb 15, 2009 at 10:38 AM, Max Powers <mpowers@...> wrote:

Hi David, please see the plugin wiki page

 

 

Hope that helps out

 

Max

On Sun, Feb 15, 2009 at 10:07 AM, dtanner <dtanner@...> wrote:

I'm writing a plug-in and I need to include a js in index.html (index.vm).
I noticed that there is a mechanism to allow this to happen
($pluginPostHeadContribution or $pluginPreHeadContributions).  However, I
cannot find and examples or documentation that shows how this is implemented
via a plug-in.

Can anyone give me some guidance on how to do this?

Thanks

David Tanner
Massachusetts Institute of Technology
Information Services and Technology
W92-144
dtanner@...
617-253-0110



---------------------------------------------------------------------
To unsubscribe, e-mail: nexus-dev-unsubscribe@...
For additional commands, e-mail: nexus-dev-help@...

 

 

 


Re: including a js in index.html

by Max Powers :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

yes, use the code i sent earlier out in your plugin js, your js file will be loaded after ours, thus you will overwrite the method
 
Max

On Sun, Feb 15, 2009 at 12:35 PM, dtanner <dtanner@...> wrote:

I there anyway to do this through a plug-in?

 

David Tanner

Massachusetts Institute of Technology

Information Services and Technology

W92-144

dtanner@...

617-253-0110

 


From: Max Powers [mailto:mpowers@...]
Sent: Sunday, February 15, 2009 12:33 PM


To: nexus-dev@...
Subject: Re: [nexus-dev] including a js in index.html

 

Sure you can do that, you simply need to replace the loginHandler method as follows in your javascript

Sonatype.repoServer.RepoServer.loginHandler = function (){

"your code here"

};



That ought to do it, note that the Sonatype.repoServer.RepoServer object is a singleton, so you can't use extjs to extend it, you will need to also copy in all code from that method that you still want to keep.

Keep us posted

Thanks

Max

On Sun, Feb 15, 2009 at 11:35 AM, dtanner <dtanner@...> wrote:

Thanks for the links, I have the js working.  That was easy.

 

I have one more question.  I would like to modify the behavior of the "Log In" button on the "server tab".  Ideally what I would like to do is to over-ride the "loginHandler" function in the repoServer.RepoServer.js and replace "loginHandler" with my custom handler.  Is this possible to do?

 

If this is not possible, what are possible alternatives?

 

Thanks,

 

 

David Tanner

Massachusetts Institute of Technology

Information Services and Technology

W92-144

dtanner@...

617-253-0110

 


From: Max Powers [mailto:mpowers@...]
Sent: Sunday, February 15, 2009 10:40 AM
To: nexus-dev@...
Subject: Re: [nexus-dev] including a js in index.html

 

In addition to that, this page shows how to add menu items to the left navigation

 

 

Max

On Sun, Feb 15, 2009 at 10:38 AM, Max Powers <mpowers@...> wrote:

Hi David, please see the plugin wiki page

 

 

Hope that helps out

 

Max

On Sun, Feb 15, 2009 at 10:07 AM, dtanner <dtanner@...> wrote:

I'm writing a plug-in and I need to include a js in index.html (index.vm).
I noticed that there is a mechanism to allow this to happen
($pluginPostHeadContribution or $pluginPreHeadContributions).  However, I
cannot find and examples or documentation that shows how this is implemented
via a plug-in.

Can anyone give me some guidance on how to do this?

Thanks

David Tanner
Massachusetts Institute of Technology
Information Services and Technology
W92-144
dtanner@...
617-253-0110



---------------------------------------------------------------------
To unsubscribe, e-mail: nexus-dev-unsubscribe@...
For additional commands, e-mail: nexus-dev-help@...

 

 

 



RE: including a js in index.html

by dtanner-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hi Max,

 

The “Log In” button is actually processed in the Sonatype.view.js with an explicit call to repoServer.RepoServer.js

 

           Ext.get('login-link').on('click', Sonatype.repoServer.RepoServer.loginHandler, Sonatype.repoServer.RepoServer);

 

I think this would imply that my custom js would have to be named repoServer.RepoServer.js.  If I did this all the functionality of the Nexus repoServer.RepoServer.js would be lost.  NOT very good.

 

It would be nice if the above Ext.get was directed to an intermediate log-in/log-out js which could be replaced by a custom log-in/log-out js.

 

Something to think about.  This would be easy to implement.

 

It seems the when dealing with custom SSO implementations, it is fairly common to want to change the behavior of the “Log In” button through a plug-in.  It would be nice if Nexus could do something along this line.

 

Thanks

 

David Tanner

Massachusetts Institute of Technology

Information Services and Technology

W92-144

dtanner@...

617-253-0110

 


From: Max Powers [mailto:mpowers@...]
Sent: Sunday, February 15, 2009 1:20 PM
To: nexus-dev@...
Subject: Re: [nexus-dev] including a js in index.html

 

yes, use the code i sent earlier out in your plugin js, your js file will be loaded after ours, thus you will overwrite the method

 

Max

On Sun, Feb 15, 2009 at 12:35 PM, dtanner <dtanner@...> wrote:

I there anyway to do this through a plug-in?

 

David Tanner

Massachusetts Institute of Technology

Information Services and Technology

W92-144

dtanner@...

617-253-0110

 


From: Max Powers [mailto:mpowers@...]
Sent: Sunday, February 15, 2009 12:33 PM


To: nexus-dev@...
Subject: Re: [nexus-dev] including a js in index.html

 

Sure you can do that, you simply need to replace the loginHandler method as follows in your javascript

Sonatype.repoServer.RepoServer.loginHandler = function (){

"your code here"

};



That ought to do it, note that the Sonatype.repoServer.RepoServer object is a singleton, so you can't use extjs to extend it, you will need to also copy in all code from that method that you still want to keep.

Keep us posted

Thanks

Max

On Sun, Feb 15, 2009 at 11:35 AM, dtanner <dtanner@...> wrote:

Thanks for the links, I have the js working.  That was easy.

 

I have one more question.  I would like to modify the behavior of the "Log In" button on the "server tab".  Ideally what I would like to do is to over-ride the "loginHandler" function in the repoServer.RepoServer.js and replace "loginHandler" with my custom handler.  Is this possible to do?

 

If this is not possible, what are possible alternatives?

 

Thanks,

 

 

David Tanner

Massachusetts Institute of Technology

Information Services and Technology

W92-144

dtanner@...

617-253-0110

 


From: Max Powers [mailto:mpowers@...]
Sent: Sunday, February 15, 2009 10:40 AM
To: nexus-dev@...
Subject: Re: [nexus-dev] including a js in index.html

 

In addition to that, this page shows how to add menu items to the left navigation

 

 

Max

On Sun, Feb 15, 2009 at 10:38 AM, Max Powers <mpowers@...> wrote:

Hi David, please see the plugin wiki page

 

 

Hope that helps out

 

Max

On Sun, Feb 15, 2009 at 10:07 AM, dtanner <dtanner@...> wrote:

I'm writing a plug-in and I need to include a js in index.html (index.vm).
I noticed that there is a mechanism to allow this to happen
($pluginPostHeadContribution or $pluginPreHeadContributions).  However, I
cannot find and examples or documentation that shows how this is implemented
via a plug-in.

Can anyone give me some guidance on how to do this?

Thanks

David Tanner
Massachusetts Institute of Technology
Information Services and Technology
W92-144
dtanner@...
617-253-0110



---------------------------------------------------------------------
To unsubscribe, e-mail: nexus-dev-unsubscribe@...
For additional commands, e-mail: nexus-dev-help@...

 

 

 

 


Re: including a js in index.html

by Dmitry Platonoff :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This is not entirely correct. You don't need to rewrite the whole
RepoServer.js, just replace the login handler method on the
Sonatype.repoServer.RepoServer singleton. In JavaScript you can just
assign a new function to any variable or property, just as Max did in
his sample.

Alternatively, you can unhook the old event handler from the login-link
element and assign your own, although the timing of this action would be
a bit more difficult, since this would have to be done AFTER the UI is
initialized. The nexusNavigationInit event handler sounds like a good
place to do it.


Dmitry

dtanner wrote:

> Hi Max,
>
>  
>
> The “Log In” button is actually processed in the Sonatype.view.js with
> an explicit call to repoServer.RepoServer.js
>
>  
>
>            Ext.get('login-link').on('click',
> Sonatype.repoServer.RepoServer.loginHandler,
> Sonatype.repoServer.RepoServer);
>
>  
>
> I think this would imply that my custom js would have to be named
> repoServer.RepoServer.js.  If I did this all the functionality of the
> Nexus repoServer.RepoServer.js would be lost.  NOT very good.
>
>  
>
> It would be nice if the above Ext.get was directed to an intermediate
> log-in/log-out js which could be replaced by a custom log-in/log-out js.
>
>  
>
> Something to think about.  This would be easy to implement.
>
>  
>
> It seems the when dealing with custom SSO implementations, it is fairly
> common to want to change the behavior of the “Log In” button through a
> plug-in.  It would be nice if Nexus could do something along this line.
>
>  
>
> Thanks
>
>  
>
> David Tanner
>
> Massachusetts Institute of Technology
>
> Information Services and Technology
>
> W92-144
>
> dtanner@... <mailto:dtanner@...>
>
> 617-253-0110
>
>  
>
> ------------------------------------------------------------------------
>
> *From:* Max Powers [mailto:mpowers@...]
> *Sent:* Sunday, February 15, 2009 1:20 PM
> *To:* nexus-dev@...
> *Subject:* Re: [nexus-dev] including a js in index.html
>
>  
>
> yes, use the code i sent earlier out in your plugin js, your js file
> will be loaded after ours, thus you will overwrite the method
>
>  
>
> Max
>
> On Sun, Feb 15, 2009 at 12:35 PM, dtanner <dtanner@...
> <mailto:dtanner@...>> wrote:
>
> I there anyway to do this through a plug-in?
>
>  
>
> David Tanner
>
> Massachusetts Institute of Technology
>
> Information Services and Technology
>
> W92-144
>
> dtanner@... <mailto:dtanner@...>
>
> 617-253-0110
>
>  
>
> ------------------------------------------------------------------------
>
> *From:* Max Powers [mailto:mpowers@...
> <mailto:mpowers@...>]
> *Sent:* Sunday, February 15, 2009 12:33 PM
>
>
> *To:* nexus-dev@... <mailto:nexus-dev@...>
> *Subject:* Re: [nexus-dev] including a js in index.html
>
>  
>
> Sure you can do that, you simply need to replace the loginHandler method
> as follows in your javascript
>
> Sonatype.repoServer.RepoServer.loginHandler = function (){
>
> "your code here"
>
> };
>
>
>
> That ought to do it, note that the Sonatype.repoServer.RepoServer object
> is a singleton, so you can't use extjs to extend it, you will need to
> also copy in all code from that method that you still want to keep.
>
> Keep us posted
>
> Thanks
>
> Max


---------------------------------------------------------------------
To unsubscribe, e-mail: nexus-dev-unsubscribe@...
For additional commands, e-mail: nexus-dev-help@...


RE: including a js in index.html

by dtanner-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks,

I'll give it a try.


David Tanner
Massachusetts Institute of Technology
Information Services and Technology
W92-144
dtanner@...
617-253-0110
 

-----Original Message-----
From: Dmitry Platonoff [mailto:dmitry@...]
Sent: Sunday, February 15, 2009 8:27 PM
To: nexus-dev@...
Subject: Re: [nexus-dev] including a js in index.html

This is not entirely correct. You don't need to rewrite the whole
RepoServer.js, just replace the login handler method on the
Sonatype.repoServer.RepoServer singleton. In JavaScript you can just
assign a new function to any variable or property, just as Max did in
his sample.

Alternatively, you can unhook the old event handler from the login-link
element and assign your own, although the timing of this action would be
a bit more difficult, since this would have to be done AFTER the UI is
initialized. The nexusNavigationInit event handler sounds like a good
place to do it.


Dmitry

dtanner wrote:

> Hi Max,
>
>  
>
> The "Log In" button is actually processed in the Sonatype.view.js with
> an explicit call to repoServer.RepoServer.js
>
>  
>
>            Ext.get('login-link').on('click',
> Sonatype.repoServer.RepoServer.loginHandler,
> Sonatype.repoServer.RepoServer);
>
>  
>
> I think this would imply that my custom js would have to be named
> repoServer.RepoServer.js.  If I did this all the functionality of the
> Nexus repoServer.RepoServer.js would be lost.  NOT very good.
>
>  
>
> It would be nice if the above Ext.get was directed to an intermediate
> log-in/log-out js which could be replaced by a custom log-in/log-out js.
>
>  
>
> Something to think about.  This would be easy to implement.
>
>  
>
> It seems the when dealing with custom SSO implementations, it is fairly
> common to want to change the behavior of the "Log In" button through a
> plug-in.  It would be nice if Nexus could do something along this line.
>
>  
>
> Thanks
>
>  
>
> David Tanner
>
> Massachusetts Institute of Technology
>
> Information Services and Technology
>
> W92-144
>
> dtanner@... <mailto:dtanner@...>
>
> 617-253-0110
>
>  
>
> ------------------------------------------------------------------------
>
> *From:* Max Powers [mailto:mpowers@...]
> *Sent:* Sunday, February 15, 2009 1:20 PM
> *To:* nexus-dev@...
> *Subject:* Re: [nexus-dev] including a js in index.html
>
>  
>
> yes, use the code i sent earlier out in your plugin js, your js file
> will be loaded after ours, thus you will overwrite the method
>
>  
>
> Max
>
> On Sun, Feb 15, 2009 at 12:35 PM, dtanner <dtanner@...
> <mailto:dtanner@...>> wrote:
>
> I there anyway to do this through a plug-in?
>
>  
>
> David Tanner
>
> Massachusetts Institute of Technology
>
> Information Services and Technology
>
> W92-144
>
> dtanner@... <mailto:dtanner@...>
>
> 617-253-0110
>
>  
>
> ------------------------------------------------------------------------
>
> *From:* Max Powers [mailto:mpowers@...
> <mailto:mpowers@...>]
> *Sent:* Sunday, February 15, 2009 12:33 PM
>
>
> *To:* nexus-dev@... <mailto:nexus-dev@...>
> *Subject:* Re: [nexus-dev] including a js in index.html
>
>  
>
> Sure you can do that, you simply need to replace the loginHandler method
> as follows in your javascript
>
> Sonatype.repoServer.RepoServer.loginHandler = function (){
>
> "your code here"
>
> };
>
>
>
> That ought to do it, note that the Sonatype.repoServer.RepoServer object
> is a singleton, so you can't use extjs to extend it, you will need to
> also copy in all code from that method that you still want to keep.
>
> Keep us posted
>
> Thanks
>
> Max


---------------------------------------------------------------------
To unsubscribe, e-mail: nexus-dev-unsubscribe@...
For additional commands, e-mail: nexus-dev-help@...



---------------------------------------------------------------------
To unsubscribe, e-mail: nexus-dev-unsubscribe@...
For additional commands, e-mail: nexus-dev-help@...


problem with overriding a function

by dtanner-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm trying to override the loginHandler (repoServer.RepoServer.js) with a
custom loginHandler as was recommended by Dmitry.

The override js is as follows:

Ext.BLANK_IMAGE_URL="ext-2.2/resources/images/default/s.gif";

(function()
{
    Ext.namespace('Sonatype.repoServer.RepoServer');

    Ext.apply(Sonatype.repoServer.RepoServer.loginHandler,
    {
        loginHandler : function()
        {
            if (Sonatype.user.curr.isLoggedIn)
            {
                Alert("in logout");
            }
            else
            {
                Alert("in login);
            }
        }
    });
})

I configured a plugin resource so that the override js is downloaded after
the repoServer.RepoServer.js and the js's get downloaded in the proper
order.

I can't get the override to work.  Apparently I'm doing something wrong.

Any ideas?

Thanks


David Tanner
Massachusetts Institute of Technology
Information Services and Technology
W92-144
dtanner@...
617-253-0110
 

-----Original Message-----
From: Dmitry Platonoff [mailto:dmitry@...]
Sent: Sunday, February 15, 2009 8:27 PM
To: nexus-dev@...
Subject: Re: [nexus-dev] including a js in index.html

This is not entirely correct. You don't need to rewrite the whole
RepoServer.js, just replace the login handler method on the
Sonatype.repoServer.RepoServer singleton. In JavaScript you can just
assign a new function to any variable or property, just as Max did in
his sample.

Alternatively, you can unhook the old event handler from the login-link
element and assign your own, although the timing of this action would be
a bit more difficult, since this would have to be done AFTER the UI is
initialized. The nexusNavigationInit event handler sounds like a good
place to do it.


Dmitry

dtanner wrote:

> Hi Max,
>
>  
>
> The "Log In" button is actually processed in the Sonatype.view.js with
> an explicit call to repoServer.RepoServer.js
>
>  
>
>            Ext.get('login-link').on('click',
> Sonatype.repoServer.RepoServer.loginHandler,
> Sonatype.repoServer.RepoServer);
>
>  
>
> I think this would imply that my custom js would have to be named
> repoServer.RepoServer.js.  If I did this all the functionality of the
> Nexus repoServer.RepoServer.js would be lost.  NOT very good.
>
>  
>
> It would be nice if the above Ext.get was directed to an intermediate
> log-in/log-out js which could be replaced by a custom log-in/log-out js.
>
>  
>
> Something to think about.  This would be easy to implement.
>
>  
>
> It seems the when dealing with custom SSO implementations, it is fairly
> common to want to change the behavior of the "Log In" button through a
> plug-in.  It would be nice if Nexus could do something along this line.
>
>  
>
> Thanks
>
>  
>
> David Tanner
>
> Massachusetts Institute of Technology
>
> Information Services and Technology
>
> W92-144
>
> dtanner@... <mailto:dtanner@...>
>
> 617-253-0110
>
>  
>
> ------------------------------------------------------------------------
>
> *From:* Max Powers [mailto:mpowers@...]
> *Sent:* Sunday, February 15, 2009 1:20 PM
> *To:* nexus-dev@...
> *Subject:* Re: [nexus-dev] including a js in index.html
>
>  
>
> yes, use the code i sent earlier out in your plugin js, your js file
> will be loaded after ours, thus you will overwrite the method
>
>  
>
> Max
>
> On Sun, Feb 15, 2009 at 12:35 PM, dtanner <dtanner@...
> <mailto:dtanner@...>> wrote:
>
> I there anyway to do this through a plug-in?
>
>  
>
> David Tanner
>
> Massachusetts Institute of Technology
>
> Information Services and Technology
>
> W92-144
>
> dtanner@... <mailto:dtanner@...>
>
> 617-253-0110
>
>  
>
> ------------------------------------------------------------------------
>
> *From:* Max Powers [mailto:mpowers@...
> <mailto:mpowers@...>]
> *Sent:* Sunday, February 15, 2009 12:33 PM
>
>
> *To:* nexus-dev@... <mailto:nexus-dev@...>
> *Subject:* Re: [nexus-dev] including a js in index.html
>
>  
>
> Sure you can do that, you simply need to replace the loginHandler method
> as follows in your javascript
>
> Sonatype.repoServer.RepoServer.loginHandler = function (){
>
> "your code here"
>
> };
>
>
>
> That ought to do it, note that the Sonatype.repoServer.RepoServer object
> is a singleton, so you can't use extjs to extend it, you will need to
> also copy in all code from that method that you still want to keep.
>
> Keep us posted
>
> Thanks
>
> Max


---------------------------------------------------------------------
To unsubscribe, e-mail: nexus-dev-unsubscribe@...
For additional commands, e-mail: nexus-dev-help@...



---------------------------------------------------------------------
To unsubscribe, e-mail: nexus-dev-unsubscribe@...
For additional commands, e-mail: nexus-dev-help@...


Re: problem with overriding a function

by Dmitry Platonoff :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Did it have to be so complicated? I just pasted Max's snippet into a
plain JavaScript file that was loaded from a plugin. And it worked.

Like this:

Sonatype.repoServer.RepoServer.loginHandler = function() {
   alert( 'isLoggedIn:' + Sonatype.user.curr.isLoggedIn );
}


Dmitry

dtanner wrote:

> I'm trying to override the loginHandler (repoServer.RepoServer.js) with a
> custom loginHandler as was recommended by Dmitry.
>
> The override js is as follows:
>
> Ext.BLANK_IMAGE_URL="ext-2.2/resources/images/default/s.gif";
>
> (function()
> {
>     Ext.namespace('Sonatype.repoServer.RepoServer');
>
>     Ext.apply(Sonatype.repoServer.RepoServer.loginHandler,
>     {
>         loginHandler : function()
>         {
>             if (Sonatype.user.curr.isLoggedIn)
>             {
>                 Alert("in logout");
>             }
>             else
>             {
>                 Alert("in login);
>             }
>         }
>     });
> })
>
> I configured a plugin resource so that the override js is downloaded after
> the repoServer.RepoServer.js and the js's get downloaded in the proper
> order.
>
> I can't get the override to work.  Apparently I'm doing something wrong.
>
> Any ideas?
>
> Thanks
>
>
> David Tanner
> Massachusetts Institute of Technology
> Information Services and Technology
> W92-144
> dtanner@...
> 617-253-0110
>  
>
> -----Original Message-----
> From: Dmitry Platonoff [mailto:dmitry@...]
> Sent: Sunday, February 15, 2009 8:27 PM
> To: nexus-dev@...
> Subject: Re: [nexus-dev] including a js in index.html
>
> This is not entirely correct. You don't need to rewrite the whole
> RepoServer.js, just replace the login handler method on the
> Sonatype.repoServer.RepoServer singleton. In JavaScript you can just
> assign a new function to any variable or property, just as Max did in
> his sample.
>
> Alternatively, you can unhook the old event handler from the login-link
> element and assign your own, although the timing of this action would be
> a bit more difficult, since this would have to be done AFTER the UI is
> initialized. The nexusNavigationInit event handler sounds like a good
> place to do it.
>
>
> Dmitry
>
> dtanner wrote:
>> Hi Max,
>>
>>  
>>
>> The "Log In" button is actually processed in the Sonatype.view.js with
>> an explicit call to repoServer.RepoServer.js
>>
>>  
>>
>>            Ext.get('login-link').on('click',
>> Sonatype.repoServer.RepoServer.loginHandler,
>> Sonatype.repoServer.RepoServer);
>>
>>  
>>
>> I think this would imply that my custom js would have to be named
>> repoServer.RepoServer.js.  If I did this all the functionality of the
>> Nexus repoServer.RepoServer.js would be lost.  NOT very good.
>>
>>  
>>
>> It would be nice if the above Ext.get was directed to an intermediate
>> log-in/log-out js which could be replaced by a custom log-in/log-out js.
>>
>>  
>>
>> Something to think about.  This would be easy to implement.
>>
>>  
>>
>> It seems the when dealing with custom SSO implementations, it is fairly
>> common to want to change the behavior of the "Log In" button through a
>> plug-in.  It would be nice if Nexus could do something along this line.
>>
>>  
>>
>> Thanks
>>
>>  
>>
>> David Tanner
>>
>> Massachusetts Institute of Technology
>>
>> Information Services and Technology
>>
>> W92-144
>>
>> dtanner@... <mailto:dtanner@...>
>>
>> 617-253-0110
>>
>>  
>>
>> ------------------------------------------------------------------------
>>
>> *From:* Max Powers [mailto:mpowers@...]
>> *Sent:* Sunday, February 15, 2009 1:20 PM
>> *To:* nexus-dev@...
>> *Subject:* Re: [nexus-dev] including a js in index.html
>>
>>  
>>
>> yes, use the code i sent earlier out in your plugin js, your js file
>> will be loaded after ours, thus you will overwrite the method
>>
>>  
>>
>> Max
>>
>> On Sun, Feb 15, 2009 at 12:35 PM, dtanner <dtanner@...
>> <mailto:dtanner@...>> wrote:
>>
>> I there anyway to do this through a plug-in?
>>
>>  
>>
>> David Tanner
>>
>> Massachusetts Institute of Technology
>>
>> Information Services and Technology
>>
>> W92-144
>>
>> dtanner@... <mailto:dtanner@...>
>>
>> 617-253-0110
>>
>>  
>>
>> ------------------------------------------------------------------------
>>
>> *From:* Max Powers [mailto:mpowers@...
>> <mailto:mpowers@...>]
>> *Sent:* Sunday, February 15, 2009 12:33 PM
>>
>>
>> *To:* nexus-dev@... <mailto:nexus-dev@...>
>> *Subject:* Re: [nexus-dev] including a js in index.html
>>
>>  
>>
>> Sure you can do that, you simply need to replace the loginHandler method
>> as follows in your javascript
>>
>> Sonatype.repoServer.RepoServer.loginHandler = function (){
>>
>> "your code here"
>>
>> };
>>
>>
>>
>> That ought to do it, note that the Sonatype.repoServer.RepoServer object
>> is a singleton, so you can't use extjs to extend it, you will need to
>> also copy in all code from that method that you still want to keep.
>>
>> Keep us posted
>>
>> Thanks
>>
>> Max
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: nexus-dev-unsubscribe@...
> For additional commands, e-mail: nexus-dev-help@...
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: nexus-dev-unsubscribe@...
> For additional commands, e-mail: nexus-dev-help@...
>

---------------------------------------------------------------------
To unsubscribe, e-mail: nexus-dev-unsubscribe@...
For additional commands, e-mail: nexus-dev-help@...


RE: including a js in index.html

by dtanner-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for your help.  I got our SSO login working.  I have one more
question.  Since the login and logout are done for the same function, it
would be nice to make a call back to the original
repoServer.RepoServer.loginHandler (from within our custom loginHandler) to
do the logout.

Is there anyway that this can be done?

Thanks.


David Tanner
Massachusetts Institute of Technology
Information Services and Technology
W92-144
dtanner@...
617-253-0110
 

-----Original Message-----
From: Dmitry Platonoff [mailto:dmitry@...]
Sent: Sunday, February 15, 2009 8:27 PM
To: nexus-dev@...
Subject: Re: [nexus-dev] including a js in index.html

This is not entirely correct. You don't need to rewrite the whole
RepoServer.js, just replace the login handler method on the
Sonatype.repoServer.RepoServer singleton. In JavaScript you can just
assign a new function to any variable or property, just as Max did in
his sample.

Alternatively, you can unhook the old event handler from the login-link
element and assign your own, although the timing of this action would be
a bit more difficult, since this would have to be done AFTER the UI is
initialized. The nexusNavigationInit event handler sounds like a good
place to do it.


Dmitry

dtanner wrote:

> Hi Max,
>
>  
>
> The "Log In" button is actually processed in the Sonatype.view.js with
> an explicit call to repoServer.RepoServer.js
>
>  
>
>            Ext.get('login-link').on('click',
> Sonatype.repoServer.RepoServer.loginHandler,
> Sonatype.repoServer.RepoServer);
>
>  
>
> I think this would imply that my custom js would have to be named
> repoServer.RepoServer.js.  If I did this all the functionality of the
> Nexus repoServer.RepoServer.js would be lost.  NOT very good.
>
>  
>
> It would be nice if the above Ext.get was directed to an intermediate
> log-in/log-out js which could be replaced by a custom log-in/log-out js.
>
>  
>
> Something to think about.  This would be easy to implement.
>
>  
>
> It seems the when dealing with custom SSO implementations, it is fairly
> common to want to change the behavior of the "Log In" button through a
> plug-in.  It would be nice if Nexus could do something along this line.
>
>  
>
> Thanks
>
>  
>
> David Tanner
>
> Massachusetts Institute of Technology
>
> Information Services and Technology
>
> W92-144
>
> dtanner@... <mailto:dtanner@...>
>
> 617-253-0110
>
>  
>
> ------------------------------------------------------------------------
>
> *From:* Max Powers [mailto:mpowers@...]
> *Sent:* Sunday, February 15, 2009 1:20 PM
> *To:* nexus-dev@...
> *Subject:* Re: [nexus-dev] including a js in index.html
>
>  
>
> yes, use the code i sent earlier out in your plugin js, your js file
> will be loaded after ours, thus you will overwrite the method
>
>  
>
> Max
>
> On Sun, Feb 15, 2009 at 12:35 PM, dtanner <dtanner@...
> <mailto:dtanner@...>> wrote:
>
> I there anyway to do this through a plug-in?
>
>  
>
> David Tanner
>
> Massachusetts Institute of Technology
>
> Information Services and Technology
>
> W92-144
>
> dtanner@... <mailto:dtanner@...>
>
> 617-253-0110
>
>  
>
> ------------------------------------------------------------------------
>
> *From:* Max Powers [mailto:mpowers@...
> <mailto:mpowers@...>]
> *Sent:* Sunday, February 15, 2009 12:33 PM
>
>
> *To:* nexus-dev@... <mailto:nexus-dev@...>
> *Subject:* Re: [nexus-dev] including a js in index.html
>
>  
>
> Sure you can do that, you simply need to replace the loginHandler method
> as follows in your javascript
>
> Sonatype.repoServer.RepoServer.loginHandler = function (){
>
> "your code here"
>
> };
>
>
>
> That ought to do it, note that the Sonatype.repoServer.RepoServer object
> is a singleton, so you can't use extjs to extend it, you will need to
> also copy in all code from that method that you still want to keep.
>
> Keep us posted
>
> Thanks
>
> Max


---------------------------------------------------------------------
To unsubscribe, e-mail: nexus-dev-unsubscribe@...
For additional commands, e-mail: nexus-dev-help@...



---------------------------------------------------------------------
To unsubscribe, e-mail: nexus-dev-unsubscribe@...
For additional commands, e-mail: nexus-dev-help@...


Re: including a js in index.html

by Dmitry Platonoff :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Certainly. Just store a reference to the old handler and invoke it when
you need to do a logout.

Also consider submitting a jira to suggest a refactoring for greater
extensibility ;]


Dmitry.

dtanner wrote:
> Thanks for your help.  I got our SSO login working.  I have one more
> question.  Since the login and logout are done for the same function, it
> would be nice to make a call back to the original
> repoServer.RepoServer.loginHandler (from within our custom loginHandler) to
> do the logout.
>
> Is there anyway that this can be done?
>
> Thanks.


---------------------------------------------------------------------
To unsubscribe, e-mail: nexus-dev-unsubscribe@...
For additional commands, e-mail: nexus-dev-help@...


RE: including a js in index.html

by dtanner-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm a real novice at all this, so please excuse my naive questions.

How do I get a reference to the old handler from within the plugin?

When I get done with this project, I plan to get approval from M.I.T. so
that I can contribute this plug in to your third party plug-ins.

David Tanner
Massachusetts Institute of Technology
Information Services and Technology
W92-144
dtanner@...
617-253-0110
 

-----Original Message-----
From: Dmitry Platonoff [mailto:dmitry@...]
Sent: Monday, February 16, 2009 3:30 PM
To: nexus-dev@...
Subject: Re: [nexus-dev] including a js in index.html

Certainly. Just store a reference to the old handler and invoke it when
you need to do a logout.

Also consider submitting a jira to suggest a refactoring for greater
extensibility ;]


Dmitry.

dtanner wrote:
> Thanks for your help.  I got our SSO login working.  I have one more
> question.  Since the login and logout are done for the same function, it
> would be nice to make a call back to the original
> repoServer.RepoServer.loginHandler (from within our custom loginHandler)
to
> do the logout.
>
> Is there anyway that this can be done?
>
> Thanks.


---------------------------------------------------------------------
To unsubscribe, e-mail: nexus-dev-unsubscribe@...
For additional commands, e-mail: nexus-dev-help@...



---------------------------------------------------------------------
To unsubscribe, e-mail: nexus-dev-unsubscribe@...
For additional commands, e-mail: nexus-dev-help@...


Re: including a js in index.html

by Dmitry Platonoff :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The simplest way is probably this:

var oldLoginHandler = Sonatype.repoServer.RepoServer.loginHandler;
Sonatype.repoServer.RepoServer.loginHandler = function() {
   if ( Sonatype.user.curr.isLoggedIn ) {
     // invoke the old handler in the RepoServer scope
     oldLoginHandler.call( Sonatype.repoServer.RepoServer );
   }
   else {
     // do your SSO thing
   }
}


dtanner wrote:

> I'm a real novice at all this, so please excuse my naive questions.
>
> How do I get a reference to the old handler from within the plugin?
>
> When I get done with this project, I plan to get approval from M.I.T. so
> that I can contribute this plug in to your third party plug-ins.
>
> David Tanner
> Massachusetts Institute of Technology
> Information Services and Technology
> W92-144
> dtanner@...
> 617-253-0110
>  
>
> -----Original Message-----
> From: Dmitry Platonoff [mailto:dmitry@...]
> Sent: Monday, February 16, 2009 3:30 PM
> To: nexus-dev@...
> Subject: Re: [nexus-dev] including a js in index.html
>
> Certainly. Just store a reference to the old handler and invoke it when
> you need to do a logout.
>
> Also consider submitting a jira to suggest a refactoring for greater
> extensibility ;]
>
>
> Dmitry.
>
> dtanner wrote:
>> Thanks for your help.  I got our SSO login working.  I have one more
>> question.  Since the login and logout are done for the same function, it
>> would be nice to make a call back to the original
>> repoServer.RepoServer.loginHandler (from within our custom loginHandler)
> to
>> do the logout.
>>
>> Is there anyway that this can be done?
>>
>> Thanks.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: nexus-dev-unsubscribe@...
> For additional commands, e-mail: nexus-dev-help@...
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: nexus-dev-unsubscribe@...
> For additional commands, e-mail: nexus-dev-help@...
>

---------------------------------------------------------------------
To unsubscribe, e-mail: nexus-dev-unsubscribe@...
For additional commands, e-mail: nexus-dev-help@...


RE: including a js in index.html

by dtanner-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for all your help.

David Tanner
Massachusetts Institute of Technology
Information Services and Technology
W92-144
dtanner@...
617-253-0110
 

-----Original Message-----
From: Dmitry Platonoff [mailto:dmitry@...]
Sent: Monday, February 16, 2009 3:57 PM
To: nexus-dev@...
Subject: Re: [nexus-dev] including a js in index.html

The simplest way is probably this:

var oldLoginHandler = Sonatype.repoServer.RepoServer.loginHandler;
Sonatype.repoServer.RepoServer.loginHandler = function() {
   if ( Sonatype.user.curr.isLoggedIn ) {
     // invoke the old handler in the RepoServer scope
     oldLoginHandler.call( Sonatype.repoServer.RepoServer );
   }
   else {
     // do your SSO thing
   }
}


dtanner wrote:

> I'm a real novice at all this, so please excuse my naive questions.
>
> How do I get a reference to the old handler from within the plugin?
>
> When I get done with this project, I plan to get approval from M.I.T. so
> that I can contribute this plug in to your third party plug-ins.
>
> David Tanner
> Massachusetts Institute of Technology
> Information Services and Technology
> W92-144
> dtanner@...
> 617-253-0110
>  
>
> -----Original Message-----
> From: Dmitry Platonoff [mailto:dmitry@...]
> Sent: Monday, February 16, 2009 3:30 PM
> To: nexus-dev@...
> Subject: Re: [nexus-dev] including a js in index.html
>
> Certainly. Just store a reference to the old handler and invoke it when
> you need to do a logout.
>
> Also consider submitting a jira to suggest a refactoring for greater
> extensibility ;]
>
>
> Dmitry.
>
> dtanner wrote:
>> Thanks for your help.  I got our SSO login working.  I have one more
>> question.  Since the login and logout are done for the same function, it
>> would be nice to make a call back to the original
>> repoServer.RepoServer.loginHandler (from within our custom loginHandler)
> to
>> do the logout.
>>
>> Is there anyway that this can be done?
>>
>> Thanks.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: nexus-dev-unsubscribe@...
> For additional commands, e-mail: nexus-dev-help@...
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: nexus-dev-unsubscribe@...
> For additional commands, e-mail: nexus-dev-help@...
>

---------------------------------------------------------------------
To unsubscribe, e-mail: nexus-dev-unsubscribe@...
For additional commands, e-mail: nexus-dev-help@...



---------------------------------------------------------------------
To unsubscribe, e-mail: nexus-dev-unsubscribe@...
For additional commands, e-mail: nexus-dev-help@...


RE: [ANN] Nexus Crowd Plugin Released

by justinedelson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If you have any additions to the documentation, feel free to make them
on Confluence. This is especially true wrt #1.

I'm not really sure I understand #4. The Crowd plugin itself doesn't
access security.xml. I would recommend keeping XmlAuthenticatingRealm
around for debugging and potentially anonymous access.

#5 - I debated this with myself, but in the end determined that it
wasn't sensible to have the additional mapping layer. I really need to
blog about this, but have been busy with other tasks. The recommended
approach, as Brian noted, is to make Nexus work with your external
groups, not the other way around.

Glad you've gotten some value out of the plugin, even if there were some
bumps along the road.

Justin

-----Original Message-----
From: rkrzewski [mailto:rafal@...]
Sent: Sunday, February 15, 2009 9:30 AM
To: nexus-dev@...
Subject: RE: [nexus-dev] [ANN] Nexus Crowd Plugin Released


Hello there

I've installed version 1.2 of the plugin yesterday. The documentation is
a bit lacking and I had some trouble to get it to work, but I succeeded
nonetheless. I thought I should share my experience to help other early
adopters and/or provide documentation item ideas.

1. I'm running nexus-webapp-1.2.1.war. unpacking the plugin into
nexus-work (so that the jars would end up in
sonatype-work/nexus/runtime/apps/nexus/lib) did not work. The plugin got
activated only after I stuffed the jar files into /WEB-INF/lib/. I
recall that Nexus-1.3 will support deploying plugins through the www
interface, so I expect it will be addressed by then.

2. I've configured sonatype-work/nexus/conf/crowd-plugin.xml, validated
that http://.../nexus/service/local/crowd/test replies "OK" and enabled
Crowd securiy realm. Great, I can see users from Crowd (in the Users
view, there's a realm selector next to "Delete" button. Took me a while
to notice). I was also able to grant roles from Crowd side: I created
some roles in Crowd named exactly like the roles in Nexus (not prefixed
with "nexus-" like in pre 1.1 plugin), assigned them to users, then used
"Refresh" in Crowd and voila! I was albe to see the newly granted role
in Nexus' user roles panel, distinguished from Nexus-assigned role by
grayed out font. So far so good.

3. Then I have removed all security realms except Crowd using the UI.
Bad idea. I got logged out and was unable to log back in. I had to
restore NexusMethodAuthorizingRealm and NexusTargetAuthorizingRealm by
hand into sonatype-work/nexus/conf/nexus.xml and restart before I was
able to log in as the user granted "admin" role through Crowd

4. Then I moved to configuring "anonymous" and "deployment" roles. My
first idea was to set up these users in the Crowd directory. I tried
that but I had problems authenticating. It turned out that the problem
was the users declared in Nexus security.xml are always visible to Crowd
(even if XmlAuthenticatingRealm is not active - however I'm not positive
about this one, I may have not restarted Nexus after removing this realm
using UI) and this somehow interferes with getting authentication info
for them from Crowd. I solved this by commenting out admin and
deployment users from security.xml and removing anonymous user from
Crowd. I've decided to keep anonymous user out of the directory, since
it's relevant to only Nexus, not the other applications I'm using with
Crowd.
At this point I was able to: log in as administrator using my own Crowd
credentials, browser repositories anonymously, and deploy to Nexus
repository using Maven1 using deployment user credentials from Crowd.

5. As a further note: I think that prefix based role mapping feature
present in the earlier release of the plugin was actually a good thing.
Some administrators may be hesitant to create 'admin' role in their
Crowd directory and assign it to users who should be able to administer
Nexus.
Using nexus-admin would be more appropriate. In case of Crowd directory
layered on top of LDAP directory, this issue could be circumvented by
creating a separate nexus-roles container in LDAP, assigning nexus roles
in there and assigning Nexus to a separate directory in Crowd using
modified mapping expressions. This method cannot be used with Crowd's
internal directory though.

Thanks again for sharing the plugin!
--
View this message in context:
http://www.nabble.com/-ANN--Nexus-Crowd-Plugin-Released-tp21783770p22023
226.html
Sent from the Nexus Maven Repository Manager Dev List mailing list
archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: nexus-dev-unsubscribe@...
For additional commands, e-mail: nexus-dev-help@...


---------------------------------------------------------------------
To unsubscribe, e-mail: nexus-dev-unsubscribe@...
For additional commands, e-mail: nexus-dev-help@...


RE: [ANN] Nexus Crowd Plugin Released

by dtanner-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm using nexus 1.2.1 war with apache 2.2.3 and Tomcat 5.5.25.

From within the GET method of a REST API, I need to retrieve header
information (using getHeader(arg)) from the original HTTP user request.  Is
there anyway that I can do this?

Thanks,

David

David Tanner
Massachusetts Institute of Technology
Information Services and Technology
W92-144
dtanner@...
617-253-0110
 


---------------------------------------------------------------------
To unsubscribe, e-mail: nexus-dev-unsubscribe@...
For additional commands, e-mail: nexus-dev-help@...


RE: [ANN] Nexus Crowd Plugin Released

by rkrzewski :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I would gladly contribute to the documentation but sonatype's confluence appears to be down. I'll check back on that.

Re #4 - my mistake: I wrote "is always visible to Crowd" when I meant "is always visible to Nexus". One way or the other, not having user names duplicated across realms is a good idea.

Re #5 - I agree that it's the right way to do it. I tried it and and it worked great for me.

Cheers,
R.

justinedelson wrote:
If you have any additions to the documentation, feel free to make them
on Confluence. This is especially true wrt #1.

I'm not really sure I understand #4. The Crowd plugin itself doesn't
access security.xml. I would recommend keeping XmlAuthenticatingRealm
around for debugging and potentially anonymous access.

#5 - I debated this with myself, but in the end determined that it
wasn't sensible to have the additional mapping layer. I really need to
blog about this, but have been busy with other tasks. The recommended
approach, as Brian noted, is to make Nexus work with your external
groups, not the other way around.

Glad you've gotten some value out of the plugin, even if there were some
bumps along the road.

Justin

-----Original Message-----
From: rkrzewski [mailto:rafal@caltha.pl]
Sent: Sunday, February 15, 2009 9:30 AM
To: nexus-dev@sonatype.org
Subject: RE: [nexus-dev] [ANN] Nexus Crowd Plugin Released


Hello there

I've installed version 1.2 of the plugin yesterday. The documentation is
a bit lacking and I had some trouble to get it to work, but I succeeded
nonetheless. I thought I should share my experience to help other early
adopters and/or provide documentation item ideas.

1. I'm running nexus-webapp-1.2.1.war. unpacking the plugin into
nexus-work (so that the jars would end up in
sonatype-work/nexus/runtime/apps/nexus/lib) did not work. The plugin got
activated only after I stuffed the jar files into /WEB-INF/lib/. I
recall that Nexus-1.3 will support deploying plugins through the www
interface, so I expect it will be addressed by then.

2. I've configured sonatype-work/nexus/conf/crowd-plugin.xml, validated
that http://.../nexus/service/local/crowd/test replies "OK" and enabled
Crowd securiy realm. Great, I can see users from Crowd (in the Users
view, there's a realm selector next to "Delete" button. Took me a while
to notice). I was also able to grant roles from Crowd side: I created
some roles in Crowd named exactly like the roles in Nexus (not prefixed
with "nexus-" like in pre 1.1 plugin), assigned them to users, then used
"Refresh" in Crowd and voila! I was albe to see the newly granted role
in Nexus' user roles panel, distinguished from Nexus-assigned role by
grayed out font. So far so good.

3. Then I have removed all security realms except Crowd using the UI.
Bad idea. I got logged out and was unable to log back in. I had to
restore NexusMethodAuthorizingRealm and NexusTargetAuthorizingRealm by
hand into sonatype-work/nexus/conf/nexus.xml and restart before I was
able to log in as the user granted "admin" role through Crowd

4. Then I moved to configuring "anonymous" and "deployment" roles. My
first idea was to set up these users in the Crowd directory. I tried
that but I had problems authenticating. It turned out that the problem
was the users declared in Nexus security.xml are always visible to Crowd
(even if XmlAuthenticatingRealm is not active - however I'm not positive
about this one, I may have not restarted Nexus after removing this realm
using UI) and this somehow interferes with getting authentication info
for them from Crowd. I solved this by commenting out admin and
deployment users from security.xml and removing anonymous user from
Crowd. I've decided to keep anonymous user out of the directory, since
it's relevant to only Nexus, not the other applications I'm using with
Crowd.
At this point I was able to: log in as administrator using my own Crowd
credentials, browser repositories anonymously, and deploy to Nexus
repository using Maven1 using deployment user credentials from Crowd.

5. As a further note: I think that prefix based role mapping feature
present in the earlier release of the plugin was actually a good thing.
Some administrators may be hesitant to create 'admin' role in their
Crowd directory and assign it to users who should be able to administer
Nexus.
Using nexus-admin would be more appropriate. In case of Crowd directory
layered on top of LDAP directory, this issue could be circumvented by
creating a separate nexus-roles container in LDAP, assigning nexus roles
in there and assigning Nexus to a separate directory in Crowd using
modified mapping expressions. This method cannot be used with Crowd's
internal directory though.

Thanks again for sharing the plugin!
--
View this message in context:
http://www.nabble.com/-ANN--Nexus-Crowd-Plugin-Released-tp21783770p22023
226.html
Sent from the Nexus Maven Repository Manager Dev List mailing list
archive at Nabble.com.
< Prev | 1 - 2 | Next >