Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Empower Replay: Limited Edition
    • Tutorials
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
      • About the DevOps Program
      • DataMiner DevOps Support
  • Downloads
  • More
    • DataMiner Releases & Updates
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

QAction – How to validate if a user from a specific dma group clicked on a button?

Solved6.79K views20th October 2020protocol QAction
4
Mieke Dryepondt [SLC] [DevOps Advocate]3.60K 19th October 2020 0 Comments

In a QAction (driver) we want to detect if the person clicking on a button (triggering the qaction) is part of a specific group or groups.

I found the level feature on param level, but this is not what I need.

I would like to make it dynamic e.g.

  • click on button is allowed for user from group A when <condition A>
  • click on button is NOT allowed for user from group A when <condition B>
  • click on button is allowed for user from group B when <condition B>

Can the usercookie be used somehow?

Mieke Dryepondt [SLC] [DevOps Advocate] Selected answer as best 20th October 2020

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
3
Joey Vanhalst [SLC] [DevOps Advocate]1.80K Posted 20th October 2020 0 Comments

The following code can be used in a QAction to get the security info to determine what user groups a user is part of:

var securityInfo = (GetUserInfoResponseMessage)protocol.SLNet.SendSingleResponseMessage(new GetInfoMessage(InfoType.SecurityInfo));
var user = securityInfo.FindUserByFullName(protocol.UserInfo);

The Groups property will contain an array of the group ids the user is part of. If the group name is needed instead of the id, then the following can be used:

var firstUserGroupId = user.Groups.First();
var firstUserGroup = securityInfo.FindGroupNameByID(firstUserGroupId);

This is just some example code so make sure the necessary checks and exception handling is implemented.

Note that this is using SLNet calls which need to be used with caution and there is no guarantee that these will not be changed in the future.

Mieke Dryepondt [SLC] [DevOps Advocate] Selected answer as best 20th October 2020
1
Thomas Cauwelier [SLC] [DevOps Advocate]1.50K Posted 19th October 2020 0 Comments

The SLProtocol.UserInfo string property contains the name of user that clicked on the button.

But it doesn’t contain information about the group(s) the user is assigned to.

Thomas Cauwelier [SLC] [DevOps Advocate] Answered question 19th October 2020
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs