I'm designing an application where I have users and admins (further down in the future, I can have different sub-ranks, where each one can have access to some area of the application).
Currently, I have a single "User" class with a "type" integer attribute, which is checked when accessing restricted areas.
This feels like "wiring" instead of a proper design, but I cant find a simple way to implement this in OOD: having an Administrator sub-class doesnt feel easy to handle or logic (would need type check for access)...
Am I wrong? What is the proper way to do this?