Packaging InvoicePlane for SandStorm.io

Hi Developers,

Objective

I love Invoice Plane and am keen on packaging it for the Sandstorm.io platform. Basically, I need to remove authentication from the app (sandstorm manages user authentication).

Question

  • Would anyone here be able to point me in the right direction in learning how the app works?
  • Any documentation on what technologies are used?
  • (Apologies if these are stupid questions)

Thanks

Lastly, I want to thank all the contributors and developers that have worked on this app, it’s amazing, I’ve been using it for a few years now.

Kind regards,

Ben

Hi!
If you want to alter or remove the authentication, you have to work with these three files:

The Admin_Controller and Guest_Controller are called from within the single modules depending on if they should be accessible by Admins or Guests.
Both these controllers call the User_Controller which checks if the current user has the role required by by the other controllers.
So, if you use another authentication method you should implement the code in the guest controller. Your authentication method should somehow differentiate between guest and admin accounts.

Thanks for the quick reply and explanation Kovah,

We commented out this line in the User_Controller class and it works as intended!

if ($this->session->userdata($required_key) <> $required_val) {
  redirect('sessions/login');
}

Cheers,
Ben

Are you sure you want to do this? InvoicePlane needs to differ between guest and admin accounts. If you just comment this line out, many things will not work as intended.

Oh, what kind of problems could arise?

The Idea is to have a single user instance. If only the Admin account is used, will this be an issue?

The thing is that IP needs to know if a guest user or an admin is accessing the application. If there is no difference, guest accounts may be able to access the admin dashboard.

No.

1 Like