com.venky.swf.plugins.collab.extensions.participation.UserEmailParticipantExtension Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of swf-plugin-collab Show documentation
Show all versions of swf-plugin-collab Show documentation
Succinct Web Framework - Plugin collaboration
package com.venky.swf.plugins.collab.extensions.participation;
import java.util.List;
import com.venky.swf.db.model.User;
import com.venky.swf.db.model.UserEmail;
import com.venky.swf.pm.DataSecurityFilter;
public class UserEmailParticipantExtension extends CompanySpecificParticipantExtension{
static {
registerExtension(new UserEmailParticipantExtension());
}
@Override
protected List getAllowedFieldValues(User user,
UserEmail partiallyFilledModel, String fieldName) {
if (fieldName.equalsIgnoreCase("USER_ID")){
return DataSecurityFilter.getIds(DataSecurityFilter.getRecordsAccessible(User.class, user));
}
return super.getAllowedFieldValues(user, partiallyFilledModel, fieldName);
}
}