Skip to main content

Hi.

 

I am logged into windows as Administrator. When I open a Smart Form in web browser through the URL found in the form properties Runtime URL in K2 Designer, I can only use this form as Administrator. If the Smart Form contains a Worklist control, it displays a worklist for K2:DENALLIXAdministrator. I need to open the form url as an SQL user (like K2SQL:John) or another AD user (like K2:DENALLIXBob). I want to see the worklist from that user, and have actions that user has on the worklist items. Without logging out Administrator and logging into windows as another user, or opening IE as an AD user. It has to work for SQL users too.

 

How can I do that? Can this be done using parameters? Thanks for all the help.

If you know the password and username then you can always right click whie holidng shift on internet explorer and select run as. It will then promt for your password and username. Then just navigate to the smarform page.


Hi, thanks for the reply.

 

I have a custom Worklist in my web application, which has multiple users. Worklist for the user currently logged into my application is displayed in a GridView, one of the fields being Data, which is the URL to the Smart Form where I can see the item and do an action on it. I open this in another browser tab, since it would be counter-intuitive to have to open IE as another user every time. And that still wouldn't work for  SQL users, which will be my primary target.

 

 


If you're using one of the K2 Core VMs (Denallix is sort of a giveaway) You can use the "user shortcuts" menu at the bottom right.

 

11937iDEA53C35B3BC584A.png

 

You can create these sort of shortcuts by referencing the documentation here:

http://technet.microsoft.com/en-us/library/bb490813.aspx if this is something you need frequently in your own environment.  Makes testing solutions with different user credentials much easier.

 

 @Bnose - So wait, you want to keep the presently logged in Windows user, and change the SQL user?  Is this only for a specific table/db or is this a system wide requirement that all users (or all in group xyz) say, use the same SQL account?


I have installed K2 SQL User Manager, which saves K2 SQL users in the table in the K2 database. I need to use the Smart Form as an K2 SQL user, like K2SQL:John. And I need to do this while logged into Windows as Administrator or any other user.

 

I know about the Users shortcuts, but I'd like to use the Smart Form as user different from the Windows logged in user, while opening the Smart Form in a new tab in the browser. I'll maybe even have to open it in an iframe in the same browser page. Depends on what the boss will say, but for now, new tab and another user is the goal.


Let's make it simpler.

 

I'd like to open a form, through it's Runtime URL, in a browser, as an K2SQL user.

 

How can I do that? Please help, my project is on hold because of this and I need to finish it soon.


Bnose,

 

If you set up forms authentication to use SQLUM, in theory, you should be able to provide credentials at the point of login.  You will need to know the username/password for that user, but yes, that should be doable.

 

Regards,

 

Mike


Hi Mike, thanks for the reply.

 

The SQLUM wasn't installed when K2 was installed, so I had to do it manually, so there could be some problems with that. For Workspace, the forms authentication works fine, and I can login with the K2SQL user. But for the Smartforms Runtime authentication, it deafults to windows, even though I have disabled it in IIS (I have Anonymous and Forms enabled), and in the web.config.

 

Could it be because the computer is in the domain, it will always use Windows authentication as default? I also have sharepoint installed, maybe that's the problem?


Hi all


 


The quickest way to open K2 Designer with a different user on the same machine without having to sign out of the current user would be to use a bat file.


I have created and attached a document explaining how to create this bat file.


 


Kind Regards


Raymond


Hi Raymond.

 

When I try to open the file, I get a message that the file is corrupt. Is it working ok for you?


Copypasted the text for you.

 

  1. Create new text document.
  2. Copy paste one of the following browsers code into the text document.

(Please change the USERNAME in the code to the user’s name that you want to access)

Internet Explorer

echo off
cls
echo ----     IE Will Start As Admin      ----
echo ----     Please Enter Password:      ----    

  1. exe /profile /savecred /user:USERNAME "C:Program Files (x86)Internet Exploreriexplore.exe"

 

Google Chrome

echo off
cls
echo ----     IE Will Start As Admin      ----
echo ----     Please Enter Password:      ----         

  1. exe /profile /savecred /user:USERNAME "<C:Program Files (x86)GoogleChromeApplicationChrome.exe>"

 

  1. Save the text document as USERNAME.bat
  2. Notice that the bat file was created, you can now delete the text document as you are going to use the bat file to access the users account.
  3. Run the bat file
  4. Enter the password (note that the password will not display as you type but you still need to enter the password even thou you cannot see what you are typing)
  5. The user’s browser should now be opened.
  6. You can now navigate to the K2 designer URL. You will notice that K2 designer will be signed in as a different user.

 

That said, this basically just automates the "shift click run as", and will work only if the user you're logging in as has a windows account.  If that account only exists in SQLUM, you're out of luck.  It sounds like your best bet is to get authentication through the SQLUM working properly.


Hi,

 

I'm now developing on a machine that has a fresh instalation of K2, where I selected a SQL User Manager. Now I can login into the Form as a K2SQL user, but the problem is, that the user doesn't logout until I clear cookies in the browser. But I asked something similar in another forum post.

 

Thanks to all that helped, now I'm moving on to other issues.


Reply