ianbauer Posted June 13, 2009 Share Posted June 13, 2009 I am building a website for a group of researchers. They want to be able to upload documents for viewing but only certain doctors may view any given document. Is there a way I can assign permissions to the documents so that specific individuals may view them? I am told that there may be 20 different permission levels. Also, they are not able to create document categories but would be working off an excel spreadsheet that will tell which doctors may view each document. Thank you in advance for any help. Quote Link to comment https://forums.phpfreaks.com/topic/162034-setting-permissions-for-documents/ Share on other sites More sharing options...
MadTechie Posted June 13, 2009 Share Posted June 13, 2009 it sounds like your creating a login system, if so then your need to control the access level via permissions you setup in the database, please note this is not the same as the filesystem permission, as all users will be using the same account name for accessing the files via PHP, Quote Link to comment https://forums.phpfreaks.com/topic/162034-setting-permissions-for-documents/#findComment-854994 Share on other sites More sharing options...
ianbauer Posted June 13, 2009 Author Share Posted June 13, 2009 yes and no,,the initial page will have a login, there will be perhaps 100 doctors that can log into the site. then there is another page that has a list of documents..(no set format for docs) from this page the user will click on a document to read it. this is where I need to curtail use as only certain doctors will be able to read certain documents. this is where I get confused on how I would do this. Quote Link to comment https://forums.phpfreaks.com/topic/162034-setting-permissions-for-documents/#findComment-855045 Share on other sites More sharing options...
.josh Posted June 13, 2009 Share Posted June 13, 2009 okay so you already have a login system in place. So add a userLevel column to the database and assign a user level to each doctor. Then have a table in your database (example called documents) that has a list of all the file names in one column (documentName), as well as a file level column (fileLevel)associated with it. Then on the page that lists the documents, you would (assuming the table with the user login info is located is called userTable): select documentName from documents where fileLevel <= userTable.userLevel loop through and display the results via php. Quote Link to comment https://forums.phpfreaks.com/topic/162034-setting-permissions-for-documents/#findComment-855049 Share on other sites More sharing options...
ianbauer Posted June 13, 2009 Author Share Posted June 13, 2009 THANK YOU! I appreciate your help, I will give it a try - have a great day. Quote Link to comment https://forums.phpfreaks.com/topic/162034-setting-permissions-for-documents/#findComment-855142 Share on other sites More sharing options...
Quendian Posted June 13, 2009 Share Posted June 13, 2009 If you are using an excel spreadsheet use it in CSV format, it makes things incredibly easy. Just a heads up. Quote Link to comment https://forums.phpfreaks.com/topic/162034-setting-permissions-for-documents/#findComment-855242 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.