admin.js 363 B

12345678910
  1. Meteor.loginAsAdmin = function (password, callback) {
  2. // Create a login request with admin:true, so our loginHandler can handle it.
  3. let loginRequest = { admin: true, password: password };
  4. Meteor._debug('Client loginAsAdmin');
  5. // Send the login request.
  6. Accounts.callLoginMethod({
  7. methodArguments: [loginRequest],
  8. userCallback: callback
  9. });
  10. };