Acumatica: Why Some User Becomes Duplicate When Modified? - acumatica

I added new users with roles designated to it and got no error. But when I add role or reset password or update info and then try to save I got error of duplicate Primary_Key.
Primary Key Error
So I delete the user and add again with correct info then it saved but when I look into the user it listed with duplicate.
Duplicate User
How can I fix it?

Related

535, b'Authentication Failed even user name and password is correct

iam trying to auto trigger the mail using python but i couldnt
following error is occuring "535, b'Authentication Failed'"
as per google search mentioned as might be incorrect user name
and passwor but i double checked username and password it is so far
correct only what might be the problem could any one guide me

User entity with one to one relation has empty drop down

I am using Jhipster 4.13.3
In the jdl, I have the following relation.
relationship OneToOne {
UserInfo{user(userName)} to User{userInfo}
}
UserInfo table has extra user detail and relates to other tables I have.
In the UI, I went to Entities -> User Info -> "Create new User info"
In this form, User input is present, but drop down is empty. I was hoping to see admin, user and all new users there.
What is the simple way to link User and UserInfo from the UI?
Thanks.
My mistake. userName doesn't exist in User. I replaced with login and it is working now.

setCanDeleteDocuments() Lotus Notes ACL

I am trying to delete document,where conditions is...
Where the user is in Group and having the deletion rights & every users in group is able to delete the document.
But problem is when, If the name I specify is also listed explicitly in the ACL and does not have deletion rights.Then it does not check the group rights which is fair enough.
For that i am trying to give deletion rights to those users who are in group by code given below.
var acl:NotesACL=database.getACL();
var entry:NotesACLEntry=acl.getFirstEntry();
if(entry!=null)
{
var user:NotesACLEntry=acl.getEntry(#UserName());
if(user.isCanDeleteDocuments()==false)
{
user.setCanDeleteDocuments(true);
acl.save();
}
}
Where it shows error like,
Exception occurred calling method NotesACL.save() null.
Even explicitly added user is having user type=person & Access= Manager in ACL.
is there any other way to do this?
Any help would be appreciated.
Thanks in advance.
Using database as a starting point means you're getting the database as the user. Unless the user already has Manager access to the database, this will fail because the user doesn't have access to update the ACL.
You can use sessionAsSigner, but bear in mind you cannot use the getCurrentDatabase() method. Instead you must use the getDatabase(server,filePath) method in order to get the database with the signer authority. Obviously the signer also needs rights to modify the ACL.

If New Document/Media uploaded in liferay by admin, user has to get message after login

I am very new to liferay. Please help me implementing the below requirement.
Using Document and media portlet in liferay, If any new document is uploaded or uploaded document is modified(Version changed) by admin user, then
How can i identify that the particular document is modified or newly uploaded as i have to show a popup message to user based upon if any new files is uploaded or modified after log on.
That is not a little change request - this required bit more development. And here is more different variants:
Simple but nonperformance variant:
With UserLocalServiceUtil you can check the last user-login date
Similarly iterate over all documents and check last modification date
Create Liferay-Portlet that shows the list of documents with modification date after last user-login date
~
Here are the steps:
Use corresponding Document Listener i.e
DlFolderListener or DlFileEntryListener. You have to use hook to
add your listner in portal.properties.
For Example, you would need to workaround below property.
value.object.listener.com.liferay.portlet.documentlibrary.model.FileEntry
= com.my.custom.MyFileEntryListener
This class would be extending BaseModelListener<FileEntry>
Override and use onAfterUpdate method to notify appropriate audience
(users).
Now this can be done by setting this notification in user
preferences.
On user Login, check corresponding user preferences for this
notification and notify user. You can use hook LoginPostAction to read user preferences for notification.
Hope this helps.
Create customfield for user. Create table with service builder to store the fileEntry Id which modified.
Create DLFileEntry Listener and write
code on FileUpdate. Add DLFileEntryID in same table created in step 1. Set
custom field true for all the user.
Create LoginPostActionHook and on Check the user's flag and fetch the FileEntryId get info of that fileEntryId and display notification with all file's information. Set customfield Flag false for particular user and remove the fileentryid from table or mark them all as read.

Creating a new admin user in activeadmin

I'm using active admin on rails 4, I white-listed the parameters for admin users in the controller using:
ActiveAdmin.register AdminUser do
controller do
def permitted_params
params.permit(:admin_user => [:email, :password, :password_confirmation])
end
end
end
but when I try to add a new user, I get the error "cannot be blank" on the email and password fields. The logs read the following:
Unpermitted parameters: utf8, authenticity_token, commit
Unpermitted parameters: utf8, authenticity_token, admin_user, commit
Is there something I'm missing?
I was also facing the same issue.
Changing
params.permit(:admin_user => [:email, :password, :password_confirmation])
to
params.permit(:user => [:email, :password, :password_confirmation])
solved the issue. devise in active admin creates model with name user and in active admin user model, its mentioned as admin_user.
In my case it was happenning because i had a validation for an associated record on that model. Disabling that validation fixes it, will need to check how to disable validations for active admin only.

Resources