StrataFrame Forum

Change user passsword

http://forum.strataframe.net/Topic18841.aspx

By Juan Carlos Pazos - 8/28/2008

Hi



I will checking how to let users to change their passwords.



I have this:



Using userBO As New MicroFour.StrataFrame.Security.BusinessObjects.SFSUsersBO()

userBO.FillByPrimaryKey(SecurityBasics.CurrentUser.UserPK)

If Login.ShowPasswordChangeForm(userBO) Then

userBO.Save()

End If

End Using


But is not working.



Does any one have a functional sample of how to this.



Regards
By Greg McGuffey - 8/29/2008

I am having a similar problem and just did a little sample app. It looks like the issue might be related to the password change failing. When I turn off complex passwords, I have no problems. However, when they are turned on and I provide a password that I know won't work (like one that includes the user's name), then when I click on OK, it just sits there, does nothing.
By Juan Carlos Pazos - 8/29/2008

Greg



It looks like the issue might be related to the password change failing. When I turn off complex passwords, I have no problems. However, when they are turned on and I provide a password that I know won't work (like one that includes the user's name), then when I click on OK, it just sits there, does nothing.




I have not noticed that, I do the same (turn off complex passwords) and works, I think the problem is not in my code.



An small detail, I use spanish, so my application has localization, must things work but in the Change password dialog there is a small problem, I add an screenshot with the text that is not localized and the translation, hope SF could add this in next update.



Regards
By Edhy Rijo - 9/22/2008

Greg McGuffey (08/29/2008)
I am having a similar problem and just did a little sample app. It looks like the issue might be related to the password change failing. When I turn off complex passwords, I have no problems. However, when they are turned on and I provide a password that I know won't work (like one that includes the user's name), then when I click on OK, it just sits there, does nothing.

I am having the same situation as Greg, but in all cases, not matter the setting for Complex Passwords, when clicking the OK button, nothing happens, so the only option is to Cancel out the Change Password form.

This is the code I am using to change the password:

Using userBO As New SFSUsersBO()

     userBO.FillByPrimaryKey(SecurityBasics.CurrentUser.UserPK)

     If Login.ShowPasswordChangeForm(userBO) Then

          userBO.Save()

     End If

End Using

Can anybody please confirm this situation, I am running latest version 1.6.6.

Thanks!

By Teddy Jensen - 1/14/2009

Has this been fixed?

Because, I have the same problem with the change password dialog.

I'm using the same code as Edhy and Greg and have not set complex passwords.

But the user can not change the password and the only option is to cancel out of the form.

There is also an issue with the gradient form header on the form - the detail text is not totally visible (see attached).

/Teddy

By Douglas Riley - 1/15/2009

I just logged in to see if this is an issue.  I am have the same problem attempting to change password within my application.
By Trent L. Taylor - 1/15/2009

Three problems all related to this dialog have been addressed and will be available in the next beta release posted.  Here are the items that have been resolved:

  • The password will not show all of the broken rules eliminating the confusion of the OK being clicked and nothing happening.
  • The cancel button is no longer accessible when the end-user is being forced to change their password
  • The title now shows the proper localization keys and renders properly.
By Greg McGuffey - 1/15/2009

On point number two. This means that they have no choice but to change their password? What if they decide to bail and just want to exit? (They don't understand what is happening and want to talk to somebody first). I'd think that maybe the cancel button becomes an Exit button in that case and shuts down the app (if that's possible).
By Trent L. Taylor - 1/15/2009

You can't exit right now anyway.  It will just pop the dialog back up.  This is a forced process anyway.  Now if they are changing a password through the security editor, then you can cancel, but this is in reference to when the "User must change password next login" flag.  When they login they must  change their password.  This has always been enforced this way, but we are now going to make it less confusing so they know that they can't click the cancel button and expect to exit.
By Philipp Guntermann - 1/15/2009

Trent L. Taylor (01/15/2009)Now if they are changing a password through the security editor,...

So we are allowed to ship the security editor with our applications ? I didnt know that. Is it fully localized ?

-Sorry for thead-hijack. Tongue

By Ivan George Borges - 1/15/2009

Is it fully localized ?

Yep.

By Trent L. Taylor - 1/15/2009

So we are allowed to ship the security editor with our applications ?

Absolutely.  Otherwise how are your end-users going to be able to create their users and assign permissions?  This is the SecurityDialog class in the Security assembly.  Just create a refefence and call SHowDialog and then it is ready for use within your app.

By Edhy Rijo - 1/15/2009

Philipp, I have the following code in my form's base class:

Private Sub ShowSecurityDialog()

     Dim showPermissionFlag As Boolean = False

     Dim showRestrictionSetsFlag As Boolean = False

     If SecurityBasics.CurrentUser.IsAdministrator Then

          showPermissionFlag = True

          showRestrictionSetsFlag = True

     End If

     '-- Create the form and show it

     Using loDialog As New SecurityDialog(showPermissionFlag, showRestrictionSetsFlag)

          loDialog.ViewSecurityKey = "UsersForm"

          loDialog.ShowDialog()

     End Using

End Sub