switch-user

Rails: Switch User Gem and issues with switching back to original user

两盒软妹~` 提交于 2020-01-05 10:09:08
问题 In my app I am using the switch_user (https://github.com/flyerhzm/switch_user) gem to allow admins to login as another user. The gem has the ability to log back in as an admin, but I am having a hard time conceptualizing how to do it. Here is my config: SwitchUser.setup do |config| # provider may be :devise, :authlogic, :clearance, :restful_authentication, :sorcery, or :session config.provider = :devise # available_users is a hash, # key is the model name of user (:user, :admin, or any name

Detect switch user with powershell

安稳与你 提交于 2019-12-12 12:18:48
问题 I want to register the date and time of each time switch user is invoked in a machine. How can I do that? Something similar to this but for the "switch user" event: detect log off and on with powershell Thank you in advance 回答1: I think that what you are looking for this : Event ID 4778 : A user has logged by selecting Switch user command (Fast User Switching). Event ID 4779 : A user has logged back on using Switch user command (Fast User Switching). But these events appears in "Security"

After COM API call, getting EOSError Exceptions (access denied) but only when switching users or Locking the station on Windows 7

我与影子孤独终老i 提交于 2019-12-10 10:36:06
问题 I have a Delphi 6 application that is getting an EOSError Exception, code 5, access denied but only when I switch away to another Windows 7 user account, or I Lock the station. I am printing out a stack trace but the error appears to be coming straight from the Application.Run() statement with Application.ProcessMessages() immediately beneath it on the stack. The rest of the stack is my Exception handling code. During operation the code does make calls to ShellExecuteEx() and accesses a COM

After COM API call, getting EOSError Exceptions (access denied) but only when switching users or Locking the station on Windows 7

孤人 提交于 2019-12-06 06:30:58
I have a Delphi 6 application that is getting an EOSError Exception, code 5, access denied but only when I switch away to another Windows 7 user account, or I Lock the station. I am printing out a stack trace but the error appears to be coming straight from the Application.Run() statement with Application.ProcessMessages() immediately beneath it on the stack. The rest of the stack is my Exception handling code. During operation the code does make calls to ShellExecuteEx() and accesses a COM/ActiveX object, but only when the user explicitly clicks a button. This only happens on Windows 7, not

unable to detect application running with another user (via switch user)

偶尔善良 提交于 2019-11-28 09:29:16
Use case : I login as " user1 " and launch Safari, then I click " user1 " on top-right corner and switch user to " user2 ". Now, I am trying to detect whether Safari is running for " user1 " but I am unable to do so with standard calls. I am using OS X 10.8 Mountain Lion for both development and running my code. I have used the following but in vain: [[NSWorkspace sharedWorkspace] runningApplications] - Safari not there in the list GetNextProcess() - Safari does not come up GetProcessForPID() - I get an error "no such process" But when I do a ps -aef | grep Safari from the terminal, I can see

unable to detect application running with another user (via switch user)

感情迁移 提交于 2019-11-27 02:56:05
问题 Use case : I login as " user1 " and launch Safari, then I click " user1 " on top-right corner and switch user to " user2 ". Now, I am trying to detect whether Safari is running for " user1 " but I am unable to do so with standard calls. I am using OS X 10.8 Mountain Lion for both development and running my code. I have used the following but in vain: [[NSWorkspace sharedWorkspace] runningApplications] - Safari not there in the list GetNextProcess() - Safari does not come up GetProcessForPID()