Thanks John. hard coding the username works.
Do I have to add any providers to the role manager tag? It's attempting to
connect to a local SQL Express database.
Also, how would you recommend locking down the Admin page with forums
authentication? I don't think I can lock it down with Windows permissions.
Thanks again!
Shannon
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of John
Davidson
Sent: Tuesday, February 12, 2008 8:59 AM
To: FlexWiki Users Mailing List
Subject: Re: [Flexwiki-users] [SPAM-LOW] Re: Forms Based Authentication
The web.config and flexwiki.config configuration settings loook like they
are correct for what you want. These should be what your final settings look
like though it may be necessary to make some revisions for testing purposes.
The AdminPages link is visible to all users in the default configuration as
there are some valid functions for regular users there. When using Windows
authentication it is possible to ensure that configuration changes are only
made by authorized users by modifying the Windows file permission settings
on flexwiki.config. We need to do some testing to determine if the Forms
authenticated principals can actually be used to achieve the same results.
It does not look like your Forms authentication is picking up the role for
the principal. The way to test this is to make a temporary modification to
your flexwiki.config file. The line
<Rule Type="Allow" Action="ManageNamespace"
Principal="role:WikiAdministrator" />
should be changed to
<Rule Type="Allow" Action="ManageNamespace"
Principal="user:<username>" />
where '<username>' is the name of a user in your membership provider who you
can log in as and who should have 'ManageNamespace' permission. You will
know that this user is logged in correctly when the 'Lock Topic' button and
link shows. If you get this working then you can try the steps below and see
if that gets roles working correctly.
Links [1] and [2] provide a good summary of membership and role provider
usage with SQL.
It is likely that you need to add the following to your web.config
<system.web>
<roleManager enabled="true" />
(there will already be a <system.web> section in the file)
Next, restore the line
<Rule Type="Allow" Action="ManageNamespace"
Principal="role:WikiAdministrator" />
in flexwiki.config and try that to confirm that the 'Lock Topic' button and
links are visible.
[1] http://www.odetocode.com/Articles/427.aspx
[2] http://www.odetocode.com/Articles/428.aspx
John Davidson
On Feb 11, 2008 11:44 PM, Shannon Ma <[EMAIL PROTECTED]> wrote:
This rocks! So while I was trying to get this to work, I wanted to have one
database that authenticates users for both my web site's support forum
(Community Server) and documentation site (FlexWiki). I ended up having
FlexWiki use the same users database as Community Server, so my customers
only need one user account for my whole web site. I use the Community
Server administration page to manage the roles. The authentication portion
is working, however I'm still seeing some weird behaviors.
Ideally, I'd like to have the following rules for FlexWiki:
Everyone: Can read the wiki.
Only users with accounts: Can edit the wiki.
Only a few select admins: Can lock topics, create namespaces, and modify
settings via the Admin page.
So with that, I have the following in my web.config for FlexWiki:
<authentication mode="Forms" />
<authorization>
<allow users="*" />
</authorization>
And the following rules:
<AuthorizationRules>
<Rule Type="Allow" Action="Read" Principal="all" />
<Rule Type="Allow" Action="Edit" Principal="authenticated" />
<Rule Type="Allow" Action="ManageNamespace"
Principal="role:WikiAdministrator" />
</AuthorizationRules>
Despite this, it doesn't seem like the rules are being picked up correctly.
I've noticed the following behaviors:
When I haven't logged in, the Admin page link shows up and I can modify
settings such as a namespace provider.
When I do login as a user that's part of the WikiAdministrator role, I don't
see the Lock Topics option.
Any ideas? Also, are there any other actions beyond Read, Edit, and
ManageNamespace for FlexWiki?
Thanks!
Shannon
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Flexwiki-users mailing list
Flexwiki-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flexwiki-users