Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. getting the role to which a user belongs

getting the role to which a user belongs

Scheduled Pinned Locked Moved Database
databasesql-serversysadmin
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Danzy83
    wrote on last edited by
    #1

    Hi, I would like to know if it is possible to determine sql role to which a user belongs. I would want my client application to enable and disable some menu items if it is able to determine the sql role to which that user belongs. I'm using Sql Server 2005. Thanks.

    M B S 3 Replies Last reply
    0
    • D Danzy83

      Hi, I would like to know if it is possible to determine sql role to which a user belongs. I would want my client application to enable and disable some menu items if it is able to determine the sql role to which that user belongs. I'm using Sql Server 2005. Thanks.

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      Are you talking about the server roles withing sql server or the active directory roles. It would be weird to use server roles to manage your UI and AD roles should be retrieved via the UI.

      Never underestimate the power of human stupidity RAH

      D 1 Reply Last reply
      0
      • D Danzy83

        Hi, I would like to know if it is possible to determine sql role to which a user belongs. I would want my client application to enable and disable some menu items if it is able to determine the sql role to which that user belongs. I'm using Sql Server 2005. Thanks.

        B Offline
        B Offline
        Blue_Boy
        wrote on last edited by
        #3

        Check this[^] and it depend how you plan to manage rights on application.


        I Love T-SQL "VB.NET is developed with C#.NET" If my post helps you kindly save my time by voting my post.

        D 1 Reply Last reply
        0
        • D Danzy83

          Hi, I would like to know if it is possible to determine sql role to which a user belongs. I would want my client application to enable and disable some menu items if it is able to determine the sql role to which that user belongs. I'm using Sql Server 2005. Thanks.

          S Offline
          S Offline
          Simon_Whale
          wrote on last edited by
          #4

          Have a read of this article SQL Server 2005: View all permissions (2) - Explode the roles![^]

          Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch

          1 Reply Last reply
          0
          • M Mycroft Holmes

            Are you talking about the server roles withing sql server or the active directory roles. It would be weird to use server roles to manage your UI and AD roles should be retrieved via the UI.

            Never underestimate the power of human stupidity RAH

            D Offline
            D Offline
            Danzy83
            wrote on last edited by
            #5

            Some users will be administrators, and I will create my own roles as well. That means I will check both the server roles and user-defined roles for a database.

            1 Reply Last reply
            0
            • B Blue_Boy

              Check this[^] and it depend how you plan to manage rights on application.


              I Love T-SQL "VB.NET is developed with C#.NET" If my post helps you kindly save my time by voting my post.

              D Offline
              D Offline
              Danzy83
              wrote on last edited by
              #6

              Blue-Boy you took me to Google. Well I have already googled and didn't find a clear solution. But I will keep trying.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups