Subversion Repositories SmartDukaan

Rev

Rev 23797 | Rev 23803 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 23797 Rev 23798
Line 1... Line 1...
1
package com.spice.profitmandi.web.util;
1
package com.spice.profitmandi.service.authentication;
2
 
2
 
3
import java.util.HashSet;
3
import java.util.HashSet;
4
import java.util.List;
4
import java.util.List;
5
import java.util.Set;
5
import java.util.Set;
6
 
6
 
Line 18... Line 18...
18
import com.spice.profitmandi.dao.enumuration.dtr.Method;
18
import com.spice.profitmandi.dao.enumuration.dtr.Method;
19
import com.spice.profitmandi.dao.enumuration.dtr.RoleType;
19
import com.spice.profitmandi.dao.enumuration.dtr.RoleType;
20
import com.spice.profitmandi.dao.repository.dtr.ApiRepository;
20
import com.spice.profitmandi.dao.repository.dtr.ApiRepository;
21
import com.spice.profitmandi.dao.repository.dtr.RoleApiRepository;
21
import com.spice.profitmandi.dao.repository.dtr.RoleApiRepository;
22
import com.spice.profitmandi.dao.repository.dtr.RoleRepository;
22
import com.spice.profitmandi.dao.repository.dtr.RoleRepository;
23
import com.spice.profitmandi.web.controller.DashboardController;
-
 
24
 
23
 
25
@Transactional
24
@Transactional
26
@Component
25
@Component
27
public class RoleManager {
26
public class RoleManager {
28
	
27
	
Line 81... Line 80...
81
		} catch(Exception e) {
80
		} catch(Exception e) {
82
			//This 
81
			//This 
83
			return false;
82
			return false;
84
		}
83
		}
85
	}
84
	}
86
	/*public boolean isUser(Set<Integer> roleIds) {
85
	public boolean isUser(Set<Integer> roleIds) {
87
		try {
86
		try {
88
			Role rolePartner = roleRepository.selectByName(RoleType.USER.name());
87
			Role rolePartner = roleRepository.selectByName(RoleType.USER.name());
89
			return roleIds.contains(rolePartner.getId());
88
			return roleIds.contains(rolePartner.getId());
90
		} catch(Exception e) {
89
		} catch(Exception e) {
91
			//This 
90
			//This 
92
			return false;
91
			return false;
93
		}
92
		}
94
	}*/
93
	}
95
}
94
}