2
Vote

Select attributes from database rows (customizable)

description

Functionality:
This adds a button to the authorization attributes screen of 'Add from DB'. Clicking that button cause a screen much like the 'Add DB Users' functionality. It brings up a list of attributes and values as defined from a user defined SQL function, JUST LIKE the db users functionality. Picking one or more items from the list adds them to the attributes. This allows people who want to authorize people into a 'list of projects' they can access easily. They can do a query in the database to return a list of projects for an admin to chose from. There one additional feature I want to add. The current database function and NetSqlAzMan api is all setup to accept an 'attributeType' parameter. The idea is that another dbfunction would be added to return a list of 'attribute types'. The list might be 'Customers', 'Projects', 'Backlog'. That would appear as a dropdown on the new form I made. By default 'all' would be selected, but picking one of the attribute types would cause the list of attributes to be filtered by that type - effectively giving my a list of projects or customers or whatever instead of one big list.
 
NetSqlAzMan:
Modified SqlAzManStore and SqlAzManApplication classes and interfaces to have two additional methods.
  - GetDBAttributes() and GetDBAttributes(string attributeType)
Above methods implemented in AzManStorageExtension

NetSqlAzMan.SnapIn
Added new form frmDBAttributesList
Put strings for new form into English resource file.
Modified frmAuthorizationAttributes to have new button, call my form and act on changes made.
 
SQL
New user defined table based function, works just like the dbUsers, but for attributes.
New demo table for the above function.
No other changes.
 
Note, if users 'upgrade' to this new version, they do not have to do anything. If they do not try to use the new button/functionality, there will be no changes required.
If they want to press that button and have it work, just add the above database info.
 
 
The .csproj files show as changed, because I added files. Other than that, the only change I made was to remove the assembly signing, since I did not have a key or password.
 
I did not modify the Webconsole project - as that is not important to me and I did not want to have to learn how that works too.
You can either add the feature in webforms, or just not have this one feature (for now) available via webforms.
I did not touch the WCF service, so not sure what is required from there. Perhaps nothing since I put the contracts, interfaces and such in place?
 
I really hope you see the value in this enhancement and will add this to the main source. I do not want to run off a 'parallel' project. I tried to keep the changes simple and to a minimum.
 
The patch was created based off the March 1st checkin you last did. BTW, consider converting your repository to Mercurial which is better for distributed development and directly supported by codeplex now.

file attachments

comments

aferende wrote Mar 30, 2010 at 8:41 AM

Hi,
I decided not to put your changes into the main code of NetSqlAzMan because I believe that this change corresponds to a specific need and not seen by all users. In the past, many users have requested new features or changes and I've actually implemented only if the majority of users have this need.

However, I Leave your patch still available for other users.
I hope you do not offend but the fact that NetSqlAzMan is open source serves to allow many users to freely apply their changes to source code.

Thank you anyway for your cooperation.

Regards,
Andrea.

WayneBrantley wrote Mar 30, 2010 at 2:56 PM

Why not put my changes in? This change does not impact anyone and offers additional features on choosing attributes. If 'majority of users' do not have this need - they will simply not use it....

Please reconsider - it does not hurt anything to put this in?

aferende wrote Mar 31, 2010 at 9:20 AM

Let the users decide.
If most of users will find it useful I will insert.
If you want you can add a new topic to understand their feelings.

WayneBrantley wrote Mar 31, 2010 at 1:30 PM

Ok, I will open a discussion.
I have made contributions to several open source products. Anytime I have added a non-intrusive feature, it has always just been accepted. Features are great things - it is not like I have changed the product functionality or anything.

WayneBrantley wrote Mar 31, 2010 at 1:41 PM

Andrea - if you look at your example in the Guide, you talk about giving scope access to 'Projects', 'Areas', 'Departments', etc. through attributes - yet you think it is a fringe case to want to pull those attributes from a database so that admins can easily always type the correct attributes in the same every time? Thanks for the consideration.

EnterpriseMonkey wrote Mar 31, 2010 at 2:15 PM

I can see this being a good thing if you have lots of DB attributes you want surfacing to the NetSqlAzMan in order to make the configuration easily and any addition that makes things easier to use is always welcome. My configuration of NetSqlAzMan also uses a few DB attributes that I have had to add. On the one hand I agree with the argument that what you might have is a specific need especailly as you want a lit of attributes returning, but on the other I can see how having attributes linked to the database would help functionality, especially if there was a method to check if the LINKED attribute(s) had changed and if so reimport them before doing something else.

aferende wrote Apr 1, 2010 at 7:07 AM

Hi,

NetSqlAzMan attributes are my alternative to the MS AzMan Scopes. (i.e.: Key: “Department”, Value: “Sales”)
Attributes are another level of abstractation so authorizations managers can change authorization context without recompiling applications.

Regards,
Andrea.

Andrea Ferendeles
NetSqlAzMan Project Coordinator
E-mail aferende@hotmail.com Web http://netsqlazman.codeplex.com

WayneBrantley wrote Apr 18, 2010 at 10:42 PM

Forgot a file in patch.