I’ve created an Agent that creates new web users & puts them in a group, creating it too, if necessary. It all works fine, except that the user can’t log in to the website, even though they’re in a group that has access. They get a ‘You are not authorized to perform this operation.’ response.
I can edit the user’s Person document by url, giving their name & password, so I know the newly created user ‘works’, but it won’t let the user in to the website.
In the DB’s ACL, I can check effective access for the user, & apart from being asked if it’s a user or a group, it reports that the user has access.
Previously & manually created users can access the site, but this one can’t.
I’ve used hierarchical names for the web users, like ‘FirstName LastName/CompanyName’. That wouldn’t cause any problems, would it?
sounds like you may just need to use the NotesDocument.ComputeWithForm method before saving the document so you get all the fields on that form computed?
Subject: RE: So you’d think, but I already did that.
In R5, and I’m pretty sure in R6, domino doesn’t recognise any web password changes for quite a while, so I would think it’s probably the same if you create a new user.So, you need to make sure that the cache of users/passwords on the server is clear. This can be done with some api code - I can send you it if you like.
Also, make sure you’ve got at least one updater task running on your server.
Subject: I’ve been restarting the (development) server each time…
… in order to be sure that this isn’t happening, as it’s the only way I can get the server to look in the Directory again!
Is there a way around this? Some API, you say? I was hoping for an equivalent to “DBCache Flush” or something - this might be just the ticket!
I know that it isn’t that problem, however, as on restarting the server I get “You are not Authorized to perform that action” instead of “Invalid user name or password was specified”.
I’d be very grateful for that API code, as it may prevent the need to keep restarting the development server.
Subject: RE: I’ve been restarting the (development) server each time…
R6 has new agent security fields in the NAB. Make sure those are set correctly. I found good explanation in “Troubleshooting agents in R6” from Agent FAQ.
By comparing all the field names, values & types before & after editing the person document (using an Agent & Excel), I found that:
(i) There was a missing text field, called $SecurePassword, which should have had a “1” in it; &
(ii) The Owner & LocalAdmin fields should have been Author fields, rather than simply text fields.
However, I have now made the Agent that processes new users do all this, & it still needs that manual edit of the person document, otherwise it just doesn’t work.