473,320 Members | 1,817 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to use membership classes with multiple 'projects'...?

My current classic-ASP site has users, projects, roles and the 2.0
membership looks like a perfect fit, but I'm having trouble finding
examples of how to have users that belong to different projects, and
have different roles per project.

The current model..

* When a user joins my site, they eventually end up joining or
creating one or more projects. But, they are not required to be a
member of a project to be a member of the site.

* As a member of the site, a user can be a member of zero or more
projects.

* They can create a project, for which they automatically assume a
'project owner' role.

* They can also join an existing project, in which they assume the
'regular member' role by default.

* So, a project will always have a member with the 'project owner'
role, zero or more with either the 'project lead' role, and zero or
more with the 'regular member' role.

* Users can leave a project at any time, unless they are the project
owner, in which case they must transfer ownership to another project
member.

* A common 'view' for a user is to view information across the
projects of which he is a member.

Currently, I have over 20,000 users, each with a unique user id (int),
and 500+ projects, each with a unique project id (int). A simple join
table associates users with projects (table:'user_projects': columns:
user_id,project_id,role,etc.)

Can I adapt the ASP.NET 2.0 membership classes to this model? After
looking for a while, I don't think an 'application' as defined by the
membership classes correlates to a 'project' in this case. I think my
projects need to be more dynamic.

Any tips, pointers, examples would be appreciated.

Thanks,
Glenn

Sep 7 '07 #1
3 2152
You can write your own membership provider to fit in with the existing 2.0
set of classes although its not something ive bothered to do.

Generally, I tend to "Roll my own" membership classes as I find it gives me
most flexibility. The set of standard classes supplied with .net are really
there as starter blocks if you like but if you need to get more serious,
then either write your own provider or simply write your own code to handle
membership and roles, It sounds like youve already done it in the backend
for ASP anyway, so a simple port to the new environment is all you probably
need to do.

"Glenn" <gl***@glenncarr.comwrote in message
news:11**********************@r34g2000hsd.googlegr oups.com...
My current classic-ASP site has users, projects, roles and the 2.0
membership looks like a perfect fit, but I'm having trouble finding
examples of how to have users that belong to different projects, and
have different roles per project.

The current model..

* When a user joins my site, they eventually end up joining or
creating one or more projects. But, they are not required to be a
member of a project to be a member of the site.

* As a member of the site, a user can be a member of zero or more
projects.

* They can create a project, for which they automatically assume a
'project owner' role.

* They can also join an existing project, in which they assume the
'regular member' role by default.

* So, a project will always have a member with the 'project owner'
role, zero or more with either the 'project lead' role, and zero or
more with the 'regular member' role.

* Users can leave a project at any time, unless they are the project
owner, in which case they must transfer ownership to another project
member.

* A common 'view' for a user is to view information across the
projects of which he is a member.

Currently, I have over 20,000 users, each with a unique user id (int),
and 500+ projects, each with a unique project id (int). A simple join
table associates users with projects (table:'user_projects': columns:
user_id,project_id,role,etc.)

Can I adapt the ASP.NET 2.0 membership classes to this model? After
looking for a while, I don't think an 'application' as defined by the
membership classes correlates to a 'project' in this case. I think my
projects need to be more dynamic.

Any tips, pointers, examples would be appreciated.

Thanks,
Glenn

Sep 7 '07 #2
I think Membership and Roles --as is-- would work just fine with a
role-based schema analagous to an alphanumeric part numbering schema so
widely used to assign "membership" and "role" categories to products, parts,
assemblies and so on.

// conceptual alphanumeric example of a "set"
G000 -- G(uest) with default access to all projects.
P000 -- P(roject) Creator

Make the alphanumeric identifier with several sets to account for future
extensibility...
G000-000-000
P000-000-000

Use alphanumeric or numeric characters in the sets to designate access
rights, project types and so on.

G001-000-000 - Guest with access to Project Type 1 where 1 may represent all
read, write, edit rights or some other designation but not the right to
delete the project and so on.

Instead of writing all the provider code you just write your own
authenication class which assigns and modifies user's roles when they
create, join or leave projects which should also be categorized by type and
indicated alphanumerically in one or more of the sets of indentifiers.

I had to so some of this for some e-commerce applications when using ASP. It
takes a lot of thinking and planning but IMO Membership and Roles --and--
Profiles are already setup for what can be complex membership models.
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/


"Just Me" <news.microsoft.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
You can write your own membership provider to fit in with the existing 2.0
set of classes although its not something ive bothered to do.

Generally, I tend to "Roll my own" membership classes as I find it gives
me most flexibility. The set of standard classes supplied with .net are
really there as starter blocks if you like but if you need to get more
serious, then either write your own provider or simply write your own code
to handle membership and roles, It sounds like youve already done it in
the backend for ASP anyway, so a simple port to the new environment is all
you probably need to do.

"Glenn" <gl***@glenncarr.comwrote in message
news:11**********************@r34g2000hsd.googlegr oups.com...
>My current classic-ASP site has users, projects, roles and the 2.0
membership looks like a perfect fit, but I'm having trouble finding
examples of how to have users that belong to different projects, and
have different roles per project.

The current model..

* When a user joins my site, they eventually end up joining or
creating one or more projects. But, they are not required to be a
member of a project to be a member of the site.

* As a member of the site, a user can be a member of zero or more
projects.

* They can create a project, for which they automatically assume a
'project owner' role.

* They can also join an existing project, in which they assume the
'regular member' role by default.

* So, a project will always have a member with the 'project owner'
role, zero or more with either the 'project lead' role, and zero or
more with the 'regular member' role.

* Users can leave a project at any time, unless they are the project
owner, in which case they must transfer ownership to another project
member.

* A common 'view' for a user is to view information across the
projects of which he is a member.

Currently, I have over 20,000 users, each with a unique user id (int),
and 500+ projects, each with a unique project id (int). A simple join
table associates users with projects (table:'user_projects': columns:
user_id,project_id,role,etc.)

Can I adapt the ASP.NET 2.0 membership classes to this model? After
looking for a while, I don't think an 'application' as defined by the
membership classes correlates to a 'project' in this case. I think my
projects need to be more dynamic.

Any tips, pointers, examples would be appreciated.

Thanks,
Glenn


Sep 8 '07 #3
mmm, well ok. But I think this fixed numbering is restrictive. better to use
relational tables with almost unlimited expansion. The way I normally do it,
is to have non hierarchical role types, so a user can have many roles
assigned to them, which do not directly depend on each other other than in
the business logic. Permissions are dependent on the object one is
accessing, again, your system can then have a table of object types with a
set of permission types associated with them. and these can be stored in a
permissions table associated with the user and objects.

ON top of this is you really want to get clever you can add groups as well,
but then you enter the arena of group manegment, and groups in themselves
like users are just another object. Where it gets really hairy is when the
groups are inclusive and exclusive as well as being nested.

Your statement about carefull thought is probably the most poignient one,
when designing such a system, one needs to keep a few things in mind.
1.) Make sure you did a good systems analysis job first.
2.) Think carefully , very carefully.
3.) Make sure its workable, and signed up to by the client, as changes
afterwards can be a nightmare.
4.) Keep flexibility in mind, but beware of over complex design.

Hope that helps.

"clintonG" <no****@nowhere.comwrote in message
news:ue**************@TK2MSFTNGP02.phx.gbl...
>I think Membership and Roles --as is-- would work just fine with a
role-based schema analagous to an alphanumeric part numbering schema so
widely used to assign "membership" and "role" categories to products,
parts, assemblies and so on.

// conceptual alphanumeric example of a "set"
G000 -- G(uest) with default access to all projects.
P000 -- P(roject) Creator

Make the alphanumeric identifier with several sets to account for future
extensibility...
G000-000-000
P000-000-000

Use alphanumeric or numeric characters in the sets to designate access
rights, project types and so on.

G001-000-000 - Guest with access to Project Type 1 where 1 may represent
all read, write, edit rights or some other designation but not the right
to delete the project and so on.

Instead of writing all the provider code you just write your own
authenication class which assigns and modifies user's roles when they
create, join or leave projects which should also be categorized by type
and indicated alphanumerically in one or more of the sets of indentifiers.

I had to so some of this for some e-commerce applications when using ASP.
It takes a lot of thinking and planning but IMO Membership and
Roles --and-- Profiles are already setup for what can be complex
membership models.
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/


"Just Me" <news.microsoft.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
>You can write your own membership provider to fit in with the existing
2.0 set of classes although its not something ive bothered to do.

Generally, I tend to "Roll my own" membership classes as I find it gives
me most flexibility. The set of standard classes supplied with .net are
really there as starter blocks if you like but if you need to get more
serious, then either write your own provider or simply write your own
code to handle membership and roles, It sounds like youve already done it
in the backend for ASP anyway, so a simple port to the new environment is
all you probably need to do.

"Glenn" <gl***@glenncarr.comwrote in message
news:11**********************@r34g2000hsd.googleg roups.com...
>>My current classic-ASP site has users, projects, roles and the 2.0
membership looks like a perfect fit, but I'm having trouble finding
examples of how to have users that belong to different projects, and
have different roles per project.

The current model..

* When a user joins my site, they eventually end up joining or
creating one or more projects. But, they are not required to be a
member of a project to be a member of the site.

* As a member of the site, a user can be a member of zero or more
projects.

* They can create a project, for which they automatically assume a
'project owner' role.

* They can also join an existing project, in which they assume the
'regular member' role by default.

* So, a project will always have a member with the 'project owner'
role, zero or more with either the 'project lead' role, and zero or
more with the 'regular member' role.

* Users can leave a project at any time, unless they are the project
owner, in which case they must transfer ownership to another project
member.

* A common 'view' for a user is to view information across the
projects of which he is a member.

Currently, I have over 20,000 users, each with a unique user id (int),
and 500+ projects, each with a unique project id (int). A simple join
table associates users with projects (table:'user_projects': columns:
user_id,project_id,role,etc.)

Can I adapt the ASP.NET 2.0 membership classes to this model? After
looking for a while, I don't think an 'application' as defined by the
membership classes correlates to a 'project' in this case. I think my
projects need to be more dynamic.

Any tips, pointers, examples would be appreciated.

Thanks,
Glenn



Sep 8 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: cybertof | last post by:
Hi ! What is the common use of sharing a single .cs across multiple project files ? I think it's to share common classes between projects. I have actually a .cs file shared accross multiple...
5
by: Tinius | last post by:
I have created a class which I wish to reuse amongst several projects. But each time I Add the class to a new project, it creates a copy of that class in the folder of the new project. This means...
0
by: yossis | last post by:
I have a .Net solution that contains multiple projects of both Managed C++ and C#. There are references in one Managed C++ project's classes to classes in another Managed C++ project. i.e....
4
by: yossis | last post by:
I have a .Net solution that contains multiple projects of both Managed C++ and C#. There are references in one Managed C++ project's classes to classes in another Managed C++ project. i.e....
1
by: Karl Rhodes | last post by:
We have an application which runs over the internet and users of this app use the new asp.net 2.0 security membership classes etc. We are writing a new backoffice administration tool for it and...
6
by: Mr Flibble | last post by:
Hi all, I've decided to use log4net for my logging/tracing. In the example on the site it shows using main() to setup the root logger and then using the LogManager within your classes to...
3
by: Mike Hudson | last post by:
Performance/good practice wise which one is preffered. 1. Keep adding new classes/forms to an existing project. Or 2. Create a new project based on the requirement and add the reference. Which...
1
by: Josh | last post by:
I'm having trouble resetting a password using these new fangled membership classes, can anyone tell me whats wrong with this sample? The membership user is being correctly returned. But I get a...
10
by: Scott Townsend | last post by:
So I'm trying to Write a Backend to something and in testing I decided to create a generic front end app that can simulate the passed in Data. So I have 2 projects in my solution, though I'm...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.