I have 7 models of login after using devise name as
1- super admin 2- admin 3- branch 4- faculty 5- student 6- parent 7- user
I want to follow a process where a super admin should have an authority to go to signup and create admin account and a admin should have authority to create branch and faculty account using signup link of branch and faculty. and super admin, admin, branch and faculty having create account of student and parent. and in user model any one can signup.
I removed a super admin signup link after creating a super admin account through changes in super admin model `
before
devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable`
after
devise :database_authenticatable, :recoverable, :rememberable, :trackable, :validatable
notice :registerable has been removed form above. using this i authenticate a super admin model only one super admin account created.
to authenticate admin model as a super admin can create this account i need a session of a super admin account and need to try this
before_filter :authenticate_admin!, only: [:new, :create]
in sign up controller as usual we do in all other application. But here is the problem I am not able to find controller file of these as someone told about this there is no controller file so kindly help in the reference to go right to solve the problem.
Aucun commentaire:
Enregistrer un commentaire