Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How to address this change - database

Author  Topic 

AdamWest
Constraint Violating Yak Guru

360 Posts

Posted - 2011-03-21 : 17:10:22
have a table called CustomerDocumenttypes based on very small Documenttypes table this is used to maintain which document type a customer can view on a dashboard app.

We have one type, the PO, that can only be viewed by certain customers.

I would like to have the control in the table I wouldn't called the column "PO" but that's what it is. It means that the program the user calls to maintain this table for them, will read this column for that permission.

is there a better way to do this?

In this program there is one super user who has he highest level of control so this user could be allowed to assign these PO allowed value.

then the same program will check this po allowed value and it will include it or not include in a drop down box of document types
available, which is standard all allowed for all customers, nothing fancy, except this PO document type.

Tables:

1.Documenttypes

Documenttypeid (int, notnull)

DocumentType (varchar(50), null)

1 PO_
2 QUOTE_
3 INVOICE_
4 DELIVERYTICKET_

2. CustomerDocumenttypes

customerDocumentTypeId (PK, int, notnull)

CustomerId (int, notnull)

DocumentTypeId (int, null)

customerDocumentTypeId CustomerId DocumentTypeId
24 104 3
25 104 2
2 105 2

X002548
Not Just a Number

15586 Posts

Posted - 2011-03-21 : 17:13:23
not sure I understand, BUT

I would set this up as tables in the db like the securtiy that SQL Server (and most things) provide

The ser logins so you know who they are

You create a group

You create a group that relates to reports

You put userids in that group

Si?

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page

AdamWest
Constraint Violating Yak Guru

360 Posts

Posted - 2011-03-21 : 17:31:40
this is a good point but this has to be very flexible and customizable because our business model is like no other and has to allow for major changes in business methodology.
Go to Top of Page
   

- Advertisement -