Win a copy of Java Challengers this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

Application access control list

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,
I would just like to ask anyone out there who has ever programmed an application that allows an administrator(through a web interface) to control which page or option or field of a form are available and whether they are read only , editable or not, whether a user has the rights to delete or not based on the authorizations a person is given. I am sure there are applications out there that have been developed with such features but how messy or complicated were they?

currently, the only thing i coud think of is using custom tags and surrounding the element of a form and the custom tag will check if the current user as rights to element of this form, if the user does, the custom tag will display the element but if it doesnt, it will not. but however, this approach also has its disadvantages: what if i have client side scripting that references this element and the user does not have acccess rights to this element, wont that result in a javascript error? or do i have to surround the script that affects that element with a acl custom tag as well? if that is the case, wouldnt that be very messy? in such an approach, i think i would have to give a unique identifier to each and every element, page, form, and that information would be stored in the database but i think that would be extremely hardcoded cos the application needs to know the link between the identifier in the database and the element in form and for that to happen, the identifier of the element would have to hardcoded into the jsp page for example.

to programme an application with page control(controls which page a user can see or not) is not too difficult but to not only control that page access and also the visibility of those fields in that page and its properties such as editable or not, i think it might be quite a headache

if i were to store all these access control list information in a database, how would the information be organized ?

i have come across applications that store references to elements to a form in a page as a "page.form.element" string so that at first glance, it becomes immediately recognizable in the database to a human to which element in the form does this permission belong to and the application also uses this string(the identifier) to match its permissions according to the the user rights.

is there already a design pattern out there already for this issue? I hope seasoned developers might be able to give me some pointers or shed some light into this issue cos i think a lot of people might faced the same task and go about it in different ways, some better than the others , some worse

Thanks!!!
 
Been there. Done that. Went back for more. But this time, I took this tiny ad with me:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic