login but not register

View: New views
8 Messages — Rating Filter:   Alert me  

login but not register

by James Cowan-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi

How do I set up a policy that allows login but not registration?

I have commented out All and Anonymous permissions as below  but this
still allows registration.

grant principal com.ecyrd.jspwiki.auth.authorize.Role "All" {
/*
    permission com.ecyrd.jspwiki.auth.permissions.PagePermission "*:*", "none";
    permission com.ecyrd.jspwiki.auth.permissions.WikiPermission "*", "editPreferences";
    permission com.ecyrd.jspwiki.auth.permissions.WikiPermission "*", "editProfile";
*/
    permission com.ecyrd.jspwiki.auth.permissions.WikiPermission "*", "login";
};


// The second policy block is extremely loose, and unsuited for public-facing wikis.
// Anonymous users are allowed to create, edit and comment on all pages.
//
// Note: For Internet-facing wikis, you are strongly advised to remove the
// lines containing the "modify" and "createPages" permissions; this will make
// the wiki read-only for anonymous users.

// Note that "modify" implies *both* "edit" and "upload", so if you wish to
// allow editing only, then replace "modify" with "edit".

grant principal com.ecyrd.jspwiki.auth.authorize.Role "Anonymous" {
/*
    permission com.ecyrd.jspwiki.auth.permissions.PagePermission "*:*", "none";
    permission com.ecyrd.jspwiki.auth.permissions.WikiPermission "*", "none";
*/
};



James

Re: login but not register

by Arian Möhlmann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi James/Cowan,

Please start subject of mail with JSPWIKI so I can directly organize
incoming mail accordingly.

Can you agree to do so?

Best Regards Arian
Op vrijdag 14-08-2009 om 14:59 uur [tijdzone +0100], schreef James
Cowan:

> Hi
>
> How do I set up a policy that allows login but not registration?
>
> I have commented out All and Anonymous permissions as below  but this
> still allows registration.
>
> grant principal com.ecyrd.jspwiki.auth.authorize.Role "All" {
> /*
>     permission com.ecyrd.jspwiki.auth.permissions.PagePermission "*:*", "none";
>     permission com.ecyrd.jspwiki.auth.permissions.WikiPermission "*", "editPreferences";
>     permission com.ecyrd.jspwiki.auth.permissions.WikiPermission "*", "editProfile";
> */
>     permission com.ecyrd.jspwiki.auth.permissions.WikiPermission "*", "login";
> };
>
>
> // The second policy block is extremely loose, and unsuited for public-facing wikis.
> // Anonymous users are allowed to create, edit and comment on all pages.
> //
> // Note: For Internet-facing wikis, you are strongly advised to remove the
> // lines containing the "modify" and "createPages" permissions; this will make
> // the wiki read-only for anonymous users.
>
> // Note that "modify" implies *both* "edit" and "upload", so if you wish to
> // allow editing only, then replace "modify" with "edit".
>
> grant principal com.ecyrd.jspwiki.auth.authorize.Role "Anonymous" {
> /*
>     permission com.ecyrd.jspwiki.auth.permissions.PagePermission "*:*", "none";
>     permission com.ecyrd.jspwiki.auth.permissions.WikiPermission "*", "none";
> */
> };
>
>
>
> James


Re: login but not register

by Janne Jalkanen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Urr... This is a mailing list.  You should organize your emails  
according to the To: -field, not the subject line.

I doubt you would get everyone on this mailing list to agree to your  
rules ;-)

/Janne

On 17 Aug 2009, at 00:02, Arian Möhlmann wrote:

> Hi James/Cowan,
>
> Please start subject of mail with JSPWIKI so I can directly organize
> incoming mail accordingly.
>
> Can you agree to do so?
>
> Best Regards Arian
> Op vrijdag 14-08-2009 om 14:59 uur [tijdzone +0100], schreef James
> Cowan:
>> Hi
>>
>> How do I set up a policy that allows login but not registration?
>>
>> I have commented out All and Anonymous permissions as below  but this
>> still allows registration.
>>
>> grant principal com.ecyrd.jspwiki.auth.authorize.Role "All" {
>> /*
>>    permission com.ecyrd.jspwiki.auth.permissions.PagePermission  
>> "*:*", "none";
>>    permission com.ecyrd.jspwiki.auth.permissions.WikiPermission  
>> "*", "editPreferences";
>>    permission com.ecyrd.jspwiki.auth.permissions.WikiPermission  
>> "*", "editProfile";
>> */
>>    permission com.ecyrd.jspwiki.auth.permissions.WikiPermission  
>> "*", "login";
>> };
>>
>>
>> // The second policy block is extremely loose, and unsuited for  
>> public-facing wikis.
>> // Anonymous users are allowed to create, edit and comment on all  
>> pages.
>> //
>> // Note: For Internet-facing wikis, you are strongly advised to  
>> remove the
>> // lines containing the "modify" and "createPages" permissions;  
>> this will make
>> // the wiki read-only for anonymous users.
>>
>> // Note that "modify" implies *both* "edit" and "upload", so if you  
>> wish to
>> // allow editing only, then replace "modify" with "edit".
>>
>> grant principal com.ecyrd.jspwiki.auth.authorize.Role "Anonymous" {
>> /*
>>    permission com.ecyrd.jspwiki.auth.permissions.PagePermission  
>> "*:*", "none";
>>    permission com.ecyrd.jspwiki.auth.permissions.WikiPermission  
>> "*", "none";
>> */
>> };
>>
>>
>>
>> James


Re: login but not register

by Mike Morris-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

James Cowan wrote:

> How do I set up a policy that allows login but not registration?
>
> I have commented out All and Anonymous permissions as below  but this
> still allows registration.

What I did for the same result was hack the login template and simply
removed the "register" link. Not as secure, I'll be the first to say,
but so far has worked fine for me.

--
mike morris :: mikro2nd (at) gmail (dot) com

http://mikro2nd.net/
http://mikro2nd.net/blog/planb/
http://mikro2nd.net/blog/mike/

This email is [X]bloggable [ ]ask-first [ ]private


Re: login but not register

by James Cowan-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Mike

Thanks for the reply. I found the answer.

You have to comment out policies using // not /* */.

grant principal com.ecyrd.jspwiki.auth.authorize.Role "All" {
    //permission com.ecyrd.jspwiki.auth.permissions.PagePermission "*:*",
"none";
    //permission com.ecyrd.jspwiki.auth.permissions.WikiPermission "*",
"editPreferences";
    //permission com.ecyrd.jspwiki.auth.permissions.WikiPermission "*",
"editProfile";
    permission com.ecyrd.jspwiki.auth.permissions.WikiPermission "*",
"login";
};

works.

grant principal com.ecyrd.jspwiki.auth.authorize.Role "All" {
/*
    permission com.ecyrd.jspwiki.auth.permissions.PagePermission "*:*",
"none";
    permission com.ecyrd.jspwiki.auth.permissions.WikiPermission "*",
"editPreferences";
    permission com.ecyrd.jspwiki.auth.permissions.WikiPermission "*",
"editProfile";
*/
    permission com.ecyrd.jspwiki.auth.permissions.WikiPermission "*",
"login";
};

does not work.

James

----- Original Message -----
From: "Mike Morris" <mikro2nd@...>
To: <jspwiki-user@...>
Sent: Monday, August 17, 2009 8:47 AM
Subject: Re: login but not register


> James Cowan wrote:
>
>> How do I set up a policy that allows login but not registration?
>>
>> I have commented out All and Anonymous permissions as below  but this
>> still allows registration.
>
> What I did for the same result was hack the login template and simply
> removed the "register" link. Not as secure, I'll be the first to say,
> but so far has worked fine for me.
>
> --
> mike morris :: mikro2nd (at) gmail (dot) com
>
> http://mikro2nd.net/
> http://mikro2nd.net/blog/planb/
> http://mikro2nd.net/blog/mike/
>
> This email is [X]bloggable [ ]ask-first [ ]private
>


--------------------------------------------------------------------------------



No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.409 / Virus Database: 270.13.58/2308 - Release Date: 08/16/09
21:46:00


Re: login but not register

by TruptiP :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Permissions doesn't deal with Login and registration page.

You can just comment out Register link from below JSP page
              LoginContent.jsp
and use web container authentication.

Allowing Register link only to Admin is not possible. I don't think such facility is available in Jspwiki.

Thanks,
Trupti
James Cowan-3 wrote:
Hi

How do I set up a policy that allows login but not registration?

I have commented out All and Anonymous permissions as below  but this
still allows registration.

grant principal com.ecyrd.jspwiki.auth.authorize.Role "All" {
/*
    permission com.ecyrd.jspwiki.auth.permissions.PagePermission "*:*", "none";
    permission com.ecyrd.jspwiki.auth.permissions.WikiPermission "*", "editPreferences";
    permission com.ecyrd.jspwiki.auth.permissions.WikiPermission "*", "editProfile";
*/
    permission com.ecyrd.jspwiki.auth.permissions.WikiPermission "*", "login";
};


// The second policy block is extremely loose, and unsuited for public-facing wikis.
// Anonymous users are allowed to create, edit and comment on all pages.
//
// Note: For Internet-facing wikis, you are strongly advised to remove the
// lines containing the "modify" and "createPages" permissions; this will make
// the wiki read-only for anonymous users.

// Note that "modify" implies *both* "edit" and "upload", so if you wish to
// allow editing only, then replace "modify" with "edit".

grant principal com.ecyrd.jspwiki.auth.authorize.Role "Anonymous" {
/*
    permission com.ecyrd.jspwiki.auth.permissions.PagePermission "*:*", "none";
    permission com.ecyrd.jspwiki.auth.permissions.WikiPermission "*", "none";
*/
};



James

Re: login but not register

by Andrew Jaquith-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Trupti and all--

Removing or commenting out the "editProfile" WikiPermision is the  
correct way to remove the ability to self-register.

Andrew

On Aug 17, 2009, at 4:41, TruptiP <trupti.p27@...> wrote:

>
> Hi,
>
> Permissions doesn't deal with Login and registration page.
>
> You can just comment out Register link from below JSP page
>              LoginContent.jsp
> and use web container authentication.
>
> Allowing Register link only to Admin is not possible. I don't think  
> such
> facility is available in Jspwiki.
>
> Thanks,
> Trupti
>
> James Cowan-3 wrote:
>>
>>
>> Hi
>>
>> How do I set up a policy that allows login but not registration?
>>
>> I have commented out All and Anonymous permissions as below  but this
>> still allows registration.
>>
>> grant principal com.ecyrd.jspwiki.auth.authorize.Role "All" {
>> /*
>>    permission com.ecyrd.jspwiki.auth.permissions.PagePermission  
>> "*:*",
>> "none";
>>    permission com.ecyrd.jspwiki.auth.permissions.WikiPermission "*",
>> "editPreferences";
>>    permission com.ecyrd.jspwiki.auth.permissions.WikiPermission "*",
>> "editProfile";
>> */
>>    permission com.ecyrd.jspwiki.auth.permissions.WikiPermission "*",
>> "login";
>> };
>>
>>
>> // The second policy block is extremely loose, and unsuited for
>> public-facing wikis.
>> // Anonymous users are allowed to create, edit and comment on all  
>> pages.
>> //
>> // Note: For Internet-facing wikis, you are strongly advised to  
>> remove the
>> // lines containing the "modify" and "createPages" permissions;  
>> this will
>> make
>> // the wiki read-only for anonymous users.
>>
>> // Note that "modify" implies *both* "edit" and "upload", so if you  
>> wish
>> to
>> // allow editing only, then replace "modify" with "edit".
>>
>> grant principal com.ecyrd.jspwiki.auth.authorize.Role "Anonymous" {
>> /*
>>    permission com.ecyrd.jspwiki.auth.permissions.PagePermission  
>> "*:*",
>> "none";
>>    permission com.ecyrd.jspwiki.auth.permissions.WikiPermission "*",
>> "none";
>> */
>> };
>>
>>
>>
>> James
>>
>>
>
> --
> View this message in context: http://www.nabble.com/login-but-not-register-tp24972998p25003125.html
> Sent from the JspWiki - User mailing list archive at Nabble.com.
>

Re: login but not register

by TruptiP :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Andrew,

Thanks for the info.

Actually I misunderstood question. I thought he just want to remove "Register New User" Tab from login page for normal users and he want to keep it only for Admin.

Now picture is clear. Thanks again for your update.


Thanks and Regards,
Trupti

Andrew Jaquith-4 wrote:
Trupti and all--

Removing or commenting out the "editProfile" WikiPermision is the  
correct way to remove the ability to self-register.

Andrew

On Aug 17, 2009, at 4:41, TruptiP <trupti.p27@gmail.com> wrote:

>
> Hi,
>
> Permissions doesn't deal with Login and registration page.
>
> You can just comment out Register link from below JSP page
>              LoginContent.jsp
> and use web container authentication.
>
> Allowing Register link only to Admin is not possible. I don't think  
> such
> facility is available in Jspwiki.
>
> Thanks,
> Trupti
>
> James Cowan-3 wrote:
>>
>>
>> Hi
>>
>> How do I set up a policy that allows login but not registration?
>>
>> I have commented out All and Anonymous permissions as below  but this
>> still allows registration.
>>
>> grant principal com.ecyrd.jspwiki.auth.authorize.Role "All" {
>> /*
>>    permission com.ecyrd.jspwiki.auth.permissions.PagePermission  
>> "*:*",
>> "none";
>>    permission com.ecyrd.jspwiki.auth.permissions.WikiPermission "*",
>> "editPreferences";
>>    permission com.ecyrd.jspwiki.auth.permissions.WikiPermission "*",
>> "editProfile";
>> */
>>    permission com.ecyrd.jspwiki.auth.permissions.WikiPermission "*",
>> "login";
>> };
>>
>>
>> // The second policy block is extremely loose, and unsuited for
>> public-facing wikis.
>> // Anonymous users are allowed to create, edit and comment on all  
>> pages.
>> //
>> // Note: For Internet-facing wikis, you are strongly advised to  
>> remove the
>> // lines containing the "modify" and "createPages" permissions;  
>> this will
>> make
>> // the wiki read-only for anonymous users.
>>
>> // Note that "modify" implies *both* "edit" and "upload", so if you  
>> wish
>> to
>> // allow editing only, then replace "modify" with "edit".
>>
>> grant principal com.ecyrd.jspwiki.auth.authorize.Role "Anonymous" {
>> /*
>>    permission com.ecyrd.jspwiki.auth.permissions.PagePermission  
>> "*:*",
>> "none";
>>    permission com.ecyrd.jspwiki.auth.permissions.WikiPermission "*",
>> "none";
>> */
>> };
>>
>>
>>
>> James
>>
>>
>
> --
> View this message in context: http://www.nabble.com/login-but-not-register-tp24972998p25003125.html
> Sent from the JspWiki - User mailing list archive at Nabble.com.
>