You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

access.ts 2.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. export default () => {
  2. const role = localStorage.getItem('role');
  3. let permissions = {}
  4. switch (role) {
  5. case 'personal':
  6. permissions = {
  7. managejobseeker: true,
  8. managejobseekerhome: true,
  9. managejobseekerdetail: true,
  10. managejobseekerresume: true,
  11. managejobseekerrecommend: true,
  12. managejobseekerresetting: true,
  13. talentjobdetail: true,
  14. talentCompanydetail: true, talentResumedetail: true, talentfairdetail: true, talentinformationdetail: true
  15. }
  16. break;
  17. case 'company':
  18. permissions = {
  19. managecompany: true,
  20. managecompanyhome: true,
  21. managecompanypost: true,
  22. managecompanyresume: true,
  23. managecompanyrecommend: true,
  24. managecompanyinfo: true,
  25. managecompanydepartment: true,
  26. managecompanyfair: true,
  27. managecompanysetting: true,
  28. talentjobdetail: true,
  29. talentCompanydetail: true, talentResumedetail: true, talentfairdetail: true, talentinformationdetail: true ,managecompanyrule: true
  30. }
  31. break;
  32. default:
  33. permissions = {
  34. talent: true,
  35. talenthome: true,
  36. talentsearchjob: true,
  37. talentsearchcompany: true,
  38. talentfair: true,
  39. talentinformation: true,
  40. talentdownload: true,
  41. talentabout: true,
  42. talentjobdetail: true,
  43. talentCompanydetail: true, talentResumedetail: true, talentfairdetail: true, talentinformationdetail: true,
  44. sciencetechnologypark: true,
  45. sciencetechnologyparkhome: true,
  46. sciencetechnologyparkabout: true,
  47. sciencetechnologyparknews: true,
  48. sciencetechnologyparkcompany: true,
  49. sciencetechnologyparknotice: true,
  50. sciencetechnologyparkconversion: true,
  51. sciencetechnologyparkactivity: true,
  52. sciencetechnologyparkconstruct: true,
  53. sciencetechnologyparkpartymembercenter: true,
  54. sciencetechnologyparkformationdetail: true,
  55. partner: true,
  56. }
  57. };
  58. console.log(permissions)
  59. return { ...permissions }
  60. };