locked
Designing a form for users privileges RRS feed

  • Question

  • HI , i have these tables

    and i want to create a form or more than one form ( i actually do not know ) for working on these tables ,

    - i can not imagine a way to design the form .

    i saw applications which uses check-boxes for choosing a privilege and assigning it to a role or a user ,

    but i can not remember how it was .

    could you provide me with screens for example or guide me in anyway ?



    Sunday, February 14, 2016 12:36 PM

Answers

  • Hi eslam,

    Your requirement is not clear.What do you mean a "form", a frontend presentation?

    Based on my understand, you can use UPOS.ROLES LEFT JOIN POS.USERS and show where POS.ROLES.ID is not null as checked and POS.ROLES.ID null as unchecked.
    SELECT * FROM POS.ROLES R LEFT JOIN POS.USERS U
    				ON U.ROLE_ID=R.ID
    				WHERE U.ID =@UserID

    If you have any question, feel free to let me know.

    Eric Zhang
    TechNet Community Support


    Monday, February 15, 2016 2:24 AM
  • I see several problems with your design.  I suggest you rethink it.

    "Users" have login credentials

    "Roles" have security rights to objects

    A "user" may be a member of 1 or more "roles".

    You would maintain these as separate screens, "users" and the "roles" associated with them.  And "roles" and the rights associated with them.

    Tuesday, February 16, 2016 1:43 PM
    Answerer

All replies

  • sorry i didnt see the tables

    Seems like you missed including the list


    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    ----------------------------
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

    Sunday, February 14, 2016 12:46 PM
  • sorry , the image disappeared because i copied and pasted it directly , did not upload it as a file .

    it's up now .

    Sunday, February 14, 2016 8:33 PM
  • Hi eslam,

    Your requirement is not clear.What do you mean a "form", a frontend presentation?

    Based on my understand, you can use UPOS.ROLES LEFT JOIN POS.USERS and show where POS.ROLES.ID is not null as checked and POS.ROLES.ID null as unchecked.
    SELECT * FROM POS.ROLES R LEFT JOIN POS.USERS U
    				ON U.ROLE_ID=R.ID
    				WHERE U.ID =@UserID

    If you have any question, feel free to let me know.

    Eric Zhang
    TechNet Community Support


    Monday, February 15, 2016 2:24 AM
  • i am sorry ,  i am an Oracle Developer , it's called a form for us which may be a " window " or " screen " for you .

    the interface with which the user deal .

    i am asking about a design for it .

    Monday, February 15, 2016 12:54 PM
  • The I'm afraid you've come to the wrong place, here would be the proper forum.

    Eric Zhang
    TechNet Community Support

    Tuesday, February 16, 2016 1:15 AM
  • off course Eric i am aware of Oracle forums , but

    designing a screen has nothing to do with a specific company or forum .

    i just need an imagination for the screen .

    Tuesday, February 16, 2016 1:15 PM
  • I see several problems with your design.  I suggest you rethink it.

    "Users" have login credentials

    "Roles" have security rights to objects

    A "user" may be a member of 1 or more "roles".

    You would maintain these as separate screens, "users" and the "roles" associated with them.  And "roles" and the rights associated with them.

    Tuesday, February 16, 2016 1:43 PM
    Answerer
  • I see several problems with your design.  I suggest you rethink it.

    "Users" have login credentials

    "Roles" have security rights to objects

    A "user" may be a member of 1 or more "roles".

    You would maintain these as separate screens, "users" and the "roles" associated with them.  And "roles" and the rights associated with them.

    do you mean problems with the ERD ?

    - the points you've mentioned , do you consider it problems ?

    - if you see something wrong wtih the erd , let us first correct it .


    P.S : The user can not be a member of more than 1 role , because " user_id " is pk in " users " table.
    Tuesday, February 16, 2016 1:58 PM
  • Let's talk about the ERD first , I've modified it to be

    what do you think ?

    Tuesday, February 16, 2016 8:44 PM
  • any help ?
    Thursday, February 18, 2016 11:11 AM
  • Eslam, did you make any progress on this?

    Thanks!


    Ed Price, Azure Development Customer Program Manager (Blog, Small Basic, Wiki Ninjas, Wiki)

    Answer an interesting question? Create a wiki article about it!

    Sunday, October 30, 2016 1:54 AM