Direct login

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Direct login

David Farber-3
I would like to have a static link that points directly to a login  
page (i.e. http://mydomain.com/login).  How can I make a url execute a  
command (in this case PRLogin) directly?

Thanks,
David
----
1 Squeak/Seaside/Pier site deployed





_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Direct login

Lukas Renggli
> I would like to have a static link that points directly to a login page
> (i.e. http://mydomain.com/login).  How can I make a url execute a command
> (in this case PRLogin) directly?

http://mydomain.com/?command=PULogin

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Direct login

David Farber-3
On Mar 1, 2009, at 12:43 AM, Lukas Renggli wrote:

>> I would like to have a static link that points directly to a login  
>> page
>> (i.e. http://mydomain.com/login).  How can I make a url execute a  
>> command
>> (in this case PRLogin) directly?
>
> http://mydomain.com/?command=PULogin

Yes, I know I can do that but I would really rather be able to map  
login (or, for that matter, potentially any command) to an arbitrary  
URL.

David
----
1 Squeak/Seaside/Pier site deployed


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Direct login

Lukas Renggli
>> http://mydomain.com/?command=PULogin
>
> Yes, I know I can do that but I would really rather be able to map login
> (or, for that matter, potentially any command) to an arbitrary URL.

That works on an arbitrary Pier URL, not just on the root. You just
have to add '?command=PULogin'.

Or do I misunderstand your question?

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Direct login

David Farber-3
On Mar 2, 2009, at 12:21 AM, Lukas Renggli wrote:

>>> http://mydomain.com/?command=PULogin
>>
>> Yes, I know I can do that but I would really rather be able to map  
>> login
>> (or, for that matter, potentially any command) to an arbitrary URL.
>
> That works on an arbitrary Pier URL, not just on the root. You just
> have to add '?command=PULogin'.
>
> Or do I misunderstand your question?

I specifically do *not* want to add '?command=PULogin' to the url.

For the Pier sites that I am deploying, I do not want there to be a  
login link on any of the pages.  There is no functionality (like wiki  
pages) for  normal users.  Only two or three administrators have  
logins (i.e. >0.1% of people accessing the site).  Since there is no  
login link, I need to be able to give them a URL to be able to login  
and I want to give them as simple a URL as possible.  In fact, the URL  
right now is /site/login and I have been thinking about adding an  
Apache rewrite rule to have /login redirect to /site/login.

Does that better explain what I am trying to accomplish?

Now that I'm writing this email I realize that I could just use a  
rewrite rule to add '?command=PULogin'--which I might go ahead and do--
but it still seems to me that it would be useful to map an arbitrary  
URL to a command without the '?command=' and without having to resort  
to Apache rewrite rules.

And while we are on the subject of commands and rewrite rules, I've  
noticed that commands post to '/' even if they are part of a longer  
URL (like mydomain.com/site/login).  This behavior is slightly  
problematic given that the default page for one of my sites is not '/'  
and I have a rewrite rule to redirect '/' to that default page.  I had  
to add a 'RewriteCond %{REQUEST_METHOD} !POST' test to my rewrite  
rule.  It would be nice if commands posted to the URL they were called  
from.

David
----
1 Squeak/Seaside/Pier site deployed


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Direct login

Lukas Renggli
> I specifically do *not* want to add '?command=PULogin' to the url.
>
> For the Pier sites that I am deploying, I do not want there to be a login
> link on any of the pages.  There is no functionality (like wiki pages) for
>  normal users.  Only two or three administrators have logins (i.e. >0.1% of
> people accessing the site).  Since there is no login link, I need to be able
> to give them a URL to be able to login and I want to give them as simple a
> URL as possible.  In fact, the URL right now is /site/login and I have been
> thinking about adding an Apache rewrite rule to have /login redirect to
> /site/login.
>
> Does that better explain what I am trying to accomplish?

Yes, you could add a rewrite rule to do that.

On my pages I usually use a hidden login link, so editors just have to
press Ctrl+L to get to the login page
(http://www.piercms.com/doc/shortcuts). If desired the login page can
also be bookmarked.

> Now that I'm writing this email I realize that I could just use a rewrite
> rule to add '?command=PULogin'--which I might go ahead and do--but it still
> seems to me that it would be useful to map an arbitrary URL to a command
> without the '?command=' and without having to resort to Apache rewrite
> rules.

The difference between '?command=PULogin' and '/login' is minimal, but
also makes other things more difficult. If commands look the same as
pages, validation of page names becomes difficult and extensibility is
at risk.

> And while we are on the subject of commands and rewrite rules, I've noticed
> that commands post to '/' even if they are part of a longer URL (like
> mydomain.com/site/login).  This behavior is slightly problematic given that
> the default page for one of my sites is not '/' and I have a rewrite rule to
> redirect '/' to that default page.  I had to add a 'RewriteCond
> %{REQUEST_METHOD} !POST' test to my rewrite rule.  It would be nice if
> commands posted to the URL they were called from.

I guess there is something wrong with your Seaside setup, that's not
what is normally happening. You can check that on seaside.st for
example.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Direct login

David Farber-3
On Mar 2, 2009, at 12:13 PM, Lukas Renggli wrote:

>> On my pages I usually use a hidden login link, so editors just have  
>> to
> press Ctrl+L to get to the login page
> (http://www.piercms.com/doc/shortcuts). If desired the login page can
> also be bookmarked.

Ctrl+L is nice--I'll use that now that I know about it--but isn't good  
enough for non-technical users.  I want /login.

> The difference between '?command=PULogin' and '/login' is minimal, but
> also makes other things more difficult. If commands look the same as
> pages, validation of page names becomes difficult and extensibility is
> at risk.

For what I have in mind, that seems like an odd reply.  Maybe I am not  
expressing myself very well.  Perhaps I should just mess around in the  
code a bit and see what I can come up with.

>> And while we are on the subject of commands and rewrite rules, I've  
>> noticed
>> that commands post to '/' even if they are part of a longer URL (like
>> mydomain.com/site/login).  This behavior is slightly problematic  
>> given that
>> the default page for one of my sites is not '/' and I have a  
>> rewrite rule to
>> redirect '/' to that default page.  I had to add a 'RewriteCond
>> %{REQUEST_METHOD} !POST' test to my rewrite rule.  It would be nice  
>> if
>> commands posted to the URL they were called from.
>
> I guess there is something wrong with your Seaside setup, that's not
> what is normally happening. You can check that on seaside.st for
> example.

Hmm.  Yes.  I can see that it is not doing this in the default Pier  
image.  I'll have to look in to this some more.  (Maybe it has to do  
with setting Server Hostname and/or Server Path?)

David
----
1 Squeak/Seaside/Pier site deployed


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki