Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7093719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:28:28+00:00 2026-05-28T08:28:28+00:00

to make debugging easier I coded an authentication hard in my application, like: User

  • 0

to make debugging easier I coded an authentication hard in my application, like:

User admin = new User("admin", "pw");
currentUser = admin;

I’m lazy and I don’t want to delete these lines every time I publish a new version, so I created a property-File with a Debug-Flag. When the flag is set on “true”, the application starts in debug-mode without authentication, otherwise a log-in is shown.

But now I’m concerned about the fact, that its very easy to get admin-access.
How would you solve that problem?

kind regards
stormsam

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T08:28:29+00:00Added an answer on May 28, 2026 at 8:28 am

    The solution to the problem is to not do that!

    This can lead to several issues:

    • Too easy to get admin access, as you state
    • Incorrect application behaviour or bad debugging info. You might test and debug as admin, but surely your users are not admins!
    • It is another control path in and of itself that has to be planned around, coded and tested

    A better solution might be to have a common admin login and password on your DEV systems. So that you can just automatically type that in or code it into your tests. A common login for a regular user would also be a good idea so you can readily test with that.

    Depending on what kind of testing and debugging you are doing, can you write automated tests (perhaps with JUnit and Selenium) to test your application? You can also run the tests against an instance of your app in debugging mode. The test itself will take care of the mundane setup and login steps so you can focus on the thing that needs debugged.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I make a user control and then want to include it on a page
I know that Xcode is supposed to make debugging easier. Could someone how this
In an effort to make debugging easier, I introduced an error handler into my
I'm trying to make debugging our Fitnesse tests easier. We're using runnerw.exe for debugging,
Can we make modifications on to the source code while debugging the Application inside
I'm debugging on my development machine and when I make changes to the css
Make a new AS3 Document in Flash, paste in the following code and run
To make things easier when switching between machines (my workstation at the office and
To make a JavaScript class with a public method I'd do something like: function
Is orthodox MVVM implementation pointless? I am creating a new application and I considered

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.