Reserving a user seat or login

AlexWileyAlexWiley Member Posts: 230
Hi everyone, I am trying to resolve an internal issue with limited user logins. We have a couple possible solutions, but one thing strongly desired is the ability to save one of the user logins for the controller. This means that out of the 8 logins they have, one should only be able to be logged into with the controller's user ID. They are connecting to SQL server directly, so no Citrix or terminal services- I read the other posts related to restricting logins based on those IPs and I couldn't garner much useful information for this issue. Thanks in advance!

Comments

  • matttraxmatttrax Member Posts: 2,309
    There's no real way to do this other than a complete hack to codeunit 1. I'm not even sure that would work.

    Have you considered the "log users off if they've been idle for too long" type of solution?

    Otherwise they either need to purchase additional users or have the controller tell someone to log off.
  • KarenhKarenh Member Posts: 209
    I work for a company that asked me to restrict users to a single login.

    I modified codeunit 1 to accomplish this. It was a small modification, not a "complete hack". The code checks the session table for other sessions for the user. If this is a 2nd login, then it goes into a loop with an ERROR. It is not elegant, as I was not able to kill the session. The user has to from the Task Manager.

    But it stopped users from logging in multiple times.
  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    This shouldn't be very complicated.

    In Cu1, CompanyOpen function you need to count number of user sessions made to your database, using the same application name as one used in current session, and error if session count is 7 (one less than available in your licence) for every user login except login used by your 'controller'.

    Regards,
    Slawek
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
Sign In or Register to comment.