473,729 Members | 2,349 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_pr ojects': 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 2179
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***@glenncar r.comwrote in message
news:11******** **************@ r34g2000hsd.goo glegroups.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_pr ojects': 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 alphanumericall y 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******** ********@TK2MSF TNGP05.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***@glenncar r.comwrote in message
news:11******** **************@ r34g2000hsd.goo glegroups.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_pr ojects': columns:
user_id,projec t_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******** ******@TK2MSFTN GP02.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 alphanumericall y 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******** ********@TK2MSF TNGP05.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***@glenncar r.comwrote in message
news:11******* *************** @r34g2000hsd.go oglegroups.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_pr ojects': columns:
user_id,proje ct_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
5377
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 projects in a same solution. It's nice to have a common "set" of Classes. Is this the only way to share classes between projects ?
5
13513
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 that when I make changes to that class, I have to apply the same changes to all the projects. Is there a setting that I have missed such that I can share one class amongst several projects? -- Tinius
0
798
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. Proj2::Class2 uses Proj1::Class1 Proj2 has a reference entry for Proj1 Each projects uses its own namespace, so Proj2::Class2.cpp has a #using
4
1238
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. Proj2::Class2 uses Proj1::Class1 Proj2 has a reference entry for Proj1 Each projects uses its own namespace, so Proj2::Class2.cpp has a #using
1
1251
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 Im having trouble working out how to access the remote sqlserver (with the membership tables in) using vb.net 2005. I can access the database, but when I come to use the security membership classes I cant seem to tell the class the connection to...
6
8105
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 create more loggers (subloggers). This is nice since I can use just one configuration file to control the behaviour of all the loggers within my app. This is great if I'm using a project that contains all my classes but what happens if my class is in...
3
1333
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 one is preferred way to use. Thanks for any help/comment/suggestion you can provide. Mike
1
1387
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 null error. MembershipUser mu = Membership.GetUser(userName); string newPassword = Membership.GeneratePassword(12, 1); mu.ChangePassword(mu.ResetPassword(), newPassword);
10
1186
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 finding that I've created classes, structs, enums, constants that are going to be neede by both. I don't want to have one project reference the other as they are not 'related' I want some 3rd project or something that I put all the stuff in. Then...
0
8761
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9426
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9281
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9142
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8148
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4795
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3238
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2163
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.