2

SO i have a quick question regarding app engine.

So i want the client to be able to register filling in information that will be inserted into EditText fields in the android clients GUI. The user information will be submited and stored using App engines entities.

Now, what i want to have is a site that can see when a new user has registered.

So i want to have a log-in console that the admin will be able to log into. But the trick is i would like to assign each admin person to be able to access only their give entity parent.

For example Bob can only access his employess based on what i set him as.

So when a new user selects "Bobs employee" from the list it will register then with bobs console only. He will then have the ability to send them pings through C2DM and delete or edit the user.

Okay so my question: is all of this possible througb AppEngine or will i need some other things??

coder_For_Life22
  • 26,645
  • 20
  • 86
  • 118
  • Yup it's possible. You'll have to code up the permissions system yourself. – dragonx Jun 21 '12 at 20:08
  • What do you mean the permissions system? So will this be all java or no? Also how would i have certain users to be a admin user person with a log in account? Would i need a seperate domain or what? – coder_For_Life22 Jun 21 '12 at 20:17
  • Also is there a easier way around this that maybe i should explorer? – coder_For_Life22 Jun 21 '12 at 20:22
  • You don't need a separate domain, you just need to code up something that keeps track of which users are admins. Look into webapp2's auth system: http://stackoverflow.com/questions/7641110/webapp2-for-authentication-and-login I don't recommend using the Google User API admins, that'll give admin users actual admin priviledges to your app, which you probably don't want. – dragonx Jun 21 '12 at 20:34

1 Answers1

1

The simple answer to your question is yes it's possible.

How you are going to do that that's another question. The general idea is to have a role attribute on the User model and from there decide the business logic on who will be able to set that field, and what things this user will be able to access based on that role.

You could also use the is_current_user_admin() (Python on GAE) function to set the role to admin when the user is also an admin of the application by default, so your system will always have at least one admin.

Lipis
  • 21,388
  • 20
  • 94
  • 121
  • But i basically instead of having just me being able to log in and see the users who are registered. I want to have different admins like myself that can look at there database of users. I wont to allow users with the application on there android device to be able to select a system to be registered under and only that admin can log in and see that user. Hope this makes sense. – coder_For_Life22 Jun 21 '12 at 20:20
  • @coder_For_Life22 well it makes sense.. and the answer is still yes.. You will have to come up with the business logic, on what services/pages every logged in users should be able to do. Same for who has access to more advanced stuff and who is the `god` of the system.. – Lipis Jun 21 '12 at 20:26