All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.venky.swf.plugins.collab.extensions.participation.UserRoleParticipantExtension Maven / Gradle / Ivy

There is a newer version: 2.12
Show newest version
package com.venky.swf.plugins.collab.extensions.participation;

import java.util.List;

import com.venky.swf.db.model.User;
import com.venky.swf.plugins.collab.db.model.user.UserRole;
import com.venky.swf.pm.DataSecurityFilter;


public class UserRoleParticipantExtension extends CompanySpecificParticipantExtension{
	static {
		registerExtension(new UserRoleParticipantExtension());
	}
	
	@Override
	protected List getAllowedFieldValues(User user,
			UserRole partiallyFilledModel, String fieldName) {
		if (fieldName.equalsIgnoreCase("USER_ID")){
			return DataSecurityFilter.getIds(DataSecurityFilter.getRecordsAccessible(User.class, user));
		}
		return super.getAllowedFieldValues(user, partiallyFilledModel, fieldName);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy