[web2py] Re: Auth - overlapping permissions problem

2020-07-26 Thread Joe Barnhart
Having more than one group with the same permissions is no problem at all. In fact, it's kind of the purpose of role-based authentication. I have a web site that features different classes of users who need access to pages. Some groups can access every single page in the site (e.g. 'root' use

[web2py] Re: Auth - overlapping permissions problem

2020-07-17 Thread Dave S
On Thursday, July 16, 2020 at 3:30:47 PM UTC-7, Paul Ellis wrote: > > the situation is that I have permissions associated with auth_groups. > > eg. user, team leader, business leader, oversight > > now I need a "secretary" or "accounts" group which has access to some > business leader features

[web2py] Re: Auth question

2018-10-30 Thread fjbernal2020
Hi, I think the easier way is here http://web2py.com/books/default/chapter/29/09/access-control > ## after auth = Auth(db) > > > db.define_table('workspaces', > > Field('workspace', 'string', requires=IS_NOT_EMPTY())) > > auth.settings.extra_fields['auth_user']= [ > Field('workspace

Re: [web2py] Re: Auth question

2018-10-28 Thread Rahul
Hi Jim, This works like a charm. Thank you for this. It is what I expected and wanted to achieve with Auth. I'll check my new project for what I may be doing wrong, for now it seems that the scaffolding admin interface I want to use for my app is the one that is the culprit. It has lots

Re: [web2py] Re: Auth question

2018-10-27 Thread Jim Steil
Rahul Let's try this a different way. Attached is a simple multi-tenant app with one table. Does this do what you need? 1. Create a new project in web2py 2. Replace db.py in your models dir with this one 3. Replace default.py in your controllers dir with this one 4. Replace index.html in vi

Re: [web2py] Re: Auth question

2018-10-27 Thread Rahul
Hi Dave and Jim, Please find the files in the zipped archive. I have added default.py, db.py, index.html and also layout file which I am converting to use with web2py. called ace.html. I have also attached the views\login.html file since I am extending this file specifically for logi

Re: [web2py] Re: Auth question

2018-10-26 Thread Jim Steil
Can you show the entire db.py, default py and index.html? Jim On Fri, Oct 26, 2018, 1:44 AM Rahul wrote: > Nope - doesnt help. I commented out all the user functions defined in the > controller and > > > # User functions --- > '''def login(): return dict(form=auth.login()) > def register(

Re: [web2py] Re: Auth question

2018-10-26 Thread Dave S
On Thursday, October 25, 2018 at 11:44:18 PM UTC-7, Rahul wrote: [...] > I even decorated index - It does take me to the login screen but from > there nothing happens. It just wont log me in like it did before. Also, I > have two users in database but none work now. Again, register seems to

Re: [web2py] Re: Auth question

2018-10-25 Thread Rahul
Nope - doesnt help. I commented out all the user functions defined in the controller and # User functions --- '''def login(): return dict(form=auth.login()) def register(): return dict(form=auth.register()) def retrieve_password(): return dict(form=auth.reset_password()) def logout(): retu

Re: [web2py] Re: Auth question

2018-10-25 Thread Jim S
Having the default user() functions is all you need. I'd try commenting out your 'user' functions. -Jim On Wednesday, October 24, 2018 at 10:59:45 PM UTC-5, Rahul wrote: > > Yes this is in default.py. Please excuse me for my bad code as I am still > experimenting with Auth and not totally fami

Re: [web2py] Re: Auth question

2018-10-24 Thread Rahul
Yes this is in default.py. Please excuse me for my bad code as I am still experimenting with Auth and not totally familiar with the implementation. Is this the right way that I am doing it? or only having user() function is enough ? Thanks, Rahul On Wednesday, October 24, 2018 at 9:45:21 PM U

Re: [web2py] Re: Auth question

2018-10-24 Thread Jim S
I'm confused. Is this code in your controller somewhere? # User functions --- def login(): return dict(form=auth.login()) def register(): return dict(form=auth.register()) def retrieve_password(): return dict(form=auth.reset_password()) def logout(): return dict(form=auth.logout()) def profi

Re: [web2py] Re: Auth question

2018-10-23 Thread Rahul
The user function remains as-is - No modifications done. def user(): """ exposes: http:///[app]/default/user/login http:///[app]/default/user/logout http:///[app]/default/user/register http:///[app]/default/user/profile http:///[app]/default/user/re

Re: [web2py] Re: Auth question

2018-10-23 Thread Jim S
Did you modify the user() function in default.py? Or, are you using your own custom login functions? -Jim On Tuesday, October 23, 2018 at 7:59:21 AM UTC-5, Rahul wrote: > > Hi Jim, All, > Okay I tried this - And I also decorated index() function in > controller like below as I want to

Re: [web2py] Re: Auth question

2018-10-23 Thread Rahul
Hi Jim, All, Okay I tried this - And I also decorated index() function in controller like below as I want to redirect the user to login page rather than directly jumping to index.html # example index page @auth.requires_login() def index(): response.flash= T("Hello World"

Re: [web2py] Re: Auth question

2018-10-18 Thread Rahul
Hi Jim, That makes sense. I will check it out on which option to go. Thanks! for all the guidance. Thank you, *Rahul Dhakate* On Wednesday, October 17, 2018 at 7:57:32 PM UTC+5:30, Jim S wrote: > > Rahul > > First, what I was referring to was common_filters, not common fields. > Here

Re: [web2py] Re: Auth question

2018-10-17 Thread Jim Steil
Rahul First, what I was referring to was common_filters, not common fields. Here is the scenario as I see it. In you auth_user table you have a workspace field. Then in other tables that are workspace-specific you also have a workspace field to show which workspace they relate to Here is how I

[web2py] Re: Auth question

2018-10-17 Thread Rahul
Hi Jim, I am afraid no I didn't check that section but I just finished reading it. Thanks! for directing me to it. Looks like a new addition to DAL (might be a couple of versions back) & looks promising. So now, we can specify something like request_tenant using db._common_fields fiel

[web2py] Re: Auth question

2018-10-16 Thread Jim S
Have you looked at common filters? http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=common+filter#Common-filters -Jim On Tuesday, October 16, 2018 at 7:35:04 AM UTC-5, Rahul wrote: > > Hey Everyone, >Greetings! I have a question. I went through Auth doc

Re: [web2py] Re: auth tables rname

2018-07-16 Thread fiubarc
Yes, I use migrate enabled in dev env and I dont use custom table definition. But, dont worry, I just wanted to find a better solution. Since I have it now it works, I will continue like this. Thank you El lunes, 16 de julio de 2018, 11:30:03 (UTC-3), Anthony escribió: > > On Monday, July 16, 2

Re: [web2py] Re: auth tables rname

2018-07-16 Thread Anthony
On Monday, July 16, 2018 at 8:49:48 AM UTC-4, fiubarc wrote: > > HI! I can not use db.auth._rname before auth.define_tables and > auth.define_tables does not work because it does not find the tables > since they are created in a different scheme than default. > What do you mean "it does not find

Re: [web2py] Re: auth tables rname

2018-07-16 Thread Romina Casal
HI! I can not use db.auth._rname before auth.define_tables and auth.define_tables does not work because it does not find the tables since they are created in a different scheme than default. Currently I use customized tables but I wanted to stop doing it since it is more difficult to maintain if t

[web2py] Re: auth tables rname

2018-07-13 Thread Anthony
You can try: db.auth_user._rname = ... db.auth_user.first_name._rname = ... Or you can code custom table definitions, as described here: http://web2py.com/books/default/chapter/29/09/access-control#Customizing-Auth Anthony On Friday, July 13, 2018 at 3:36:51 PM UTC-4, fiubarc wrote: > > Hello

Re: [web2py] Re: auth decorator with rest api

2018-04-15 Thread yogeshwar khalkar
The site is served by angular and angular calling the web2py API but, the site is not online to show you. If someone worked on this scenario Please give me some pointers. ‌ Thanks, Yogeshwar On Sat, Apr 14, 2018 at 11:51 PM, Anthony wrote: > Hard to say what is going on. Would have to see

Re: [web2py] Re: auth decorator with rest api

2018-04-14 Thread Anthony
Hard to say what is going on. Would have to see how these Ajax calls are being made and what response is received by the browser. What is the URL in the address bar of the browser? Is the site being served by web2py (port 8000) or by an angular development server (port 4200)? Anthony On Saturd

Re: [web2py] Re: auth decorator with rest api

2018-04-13 Thread yogeshwar khalkar
The session cookie is being set and user record is being added to the session upon login. but it not being sent back and forth on each request. Also, self.user is None before logout and logout event is not being added to the auth_event table. I am confused here with sending session back and forth

Re: [web2py] Re: auth decorator with rest api

2018-04-13 Thread Anthony
So, are both the login and subsequent requests all being made via Ajax from a browser? If so, confirm that the session cookie is being set and sent back and forth on each request, and confirm that the user record is being added to the session upon login. On Friday, April 13, 2018 at 12:27:35 AM

Re: [web2py] Re: auth decorator with rest api

2018-04-12 Thread yogeshwar khalkar
For logging, I am using rest API @request.restful() def login(): def POST(): fields = simplejson.loads(request.body.read()) user = super(Auth, auth).login(**fields) return json(user) return locals() I am using this api in angular so for calling getActivity *Angul

[web2py] Re: auth decorator with rest api

2018-04-12 Thread Anthony
How are you (a) logging in and (b) making the calls to getActivity? On Thursday, April 12, 2018 at 8:55:02 AM UTC-4, yogeshwar khalkar wrote: > > Hi All, > > > I was implementing the @auth.requires_login() with @request.restful() but it > not working. > > It redirects me every time even if I am l

[web2py] Re: auth decorator with rest api

2018-04-12 Thread Anthony
> > Doesn't the decorator have to go on the "def call():" (bottom of > default.py in the welcome app) ? > http://web2py.com/books/default/chapter/29/10/services#Services-and-Authentication > >

[web2py] Re: auth decorator with rest api

2018-04-12 Thread Dave S
On Thursday, April 12, 2018 at 5:55:02 AM UTC-7, yogeshwar khalkar wrote: > > Hi All, > > > I was implementing the @auth.requires_login() with @request.restful() but it > not working. > > It redirects me every time even if I am login. > > > @auth.requires_login() > @request.restful() > def getAc

[web2py] Re: Auth change password confirmation

2017-04-12 Thread Alfonso Serra
What i wanted is a profile page with all the auth forms, profile, change password and create users if the logged in user is an admin. As for the change password confirmation i have to use session.flash to got the success message but the problem was it is always empty even when the form was succ

[web2py] Re: Auth change password confirmation

2017-04-10 Thread Anthony
On Sunday, April 9, 2017 at 10:57:08 PM UTC-4, Alfonso Serra wrote: > > Thanks Anthony, but thats the matter, redirection is not optional. It will > happen regardless. I would like not to redirect to make use of form.errors, > form.accepted to style the view. > The redirect happens only if the f

[web2py] Re: Auth change password confirmation

2017-04-09 Thread Alfonso Serra
Thanks Anthony, but thats the matter, redirection is not optional. It will happen regardless. I would like not to redirect to make use of form.errors, form.accepted to style the view. Other issue is that change password and profile shares the same view, so there are multiple redirections going o

[web2py] Re: Auth change password confirmation

2017-04-09 Thread Anthony
You are probably better off using the onaccept callback, which could do its own redirect and/or set a session flag. Anthony On Sunday, April 9, 2017 at 5:22:02 PM UTC-4, Alfonso Serra wrote: > > Ok its sorted but i had to change tools.py to remove the redirection, line > 3978 like: > >

[web2py] Re: Auth change password confirmation

2017-04-09 Thread Alfonso Serra
Ok its sorted but i had to change tools.py to remove the redirection, line 3978 like: if form.accepts(request, session, formname='change_password', onvalidation=onvalidation, hideerror=self.settings.hideerror):

[web2py] Re: Auth change password confirmation

2017-04-09 Thread Alfonso Serra
It is always False. Reading the auth.change_password() code. Theres always a redirection. The only method to know about the password change is session.flash. Now i cant get session.flash because i have multiple auth forms in the same view and there may be multiple redirections that sets sessio

[web2py] Re: Auth change password confirmation

2017-04-09 Thread Anthony
What happens if you do: if form_pass.accepted: Anthony On Sunday, April 9, 2017 at 1:14:11 PM UTC-4, Alfonso Serra wrote: > > I cant check if the auth form to change a password is accepted. I have > been debugging a post and post_vars and form.vars are empty. I dont know > whats going, the

[web2py] Re: Auth -- members of both groups

2017-02-02 Thread Leonel Câmara
I'm sorry. Correct version: @auth.requires(lambda: auth.has_membership('green') or auth.has_membership( 'blue')) def functionX(): ... As for the object, I would just use the name of the function for now. It really only matters if you're using crud as it knows what to do with it and record_id

[web2py] Re: Auth -- members of both groups

2017-02-02 Thread Dave S
On Thursday, February 2, 2017 at 5:12:35 PM UTC-8, Leonel Câmara wrote: > > The most correct way would be to give permission to both groups and then > use requires_permission. > > In auth.add_permission(group_id, 'name', 'object', record_id), what would I specify as the object in order to gate

[web2py] Re: Auth -- members of both groups

2017-02-02 Thread Leonel Câmara
The most correct way would be to give permission to both groups and then use requires_permission. If you don't plan on using permissions: @auth.requires(auth.has_membership('green') or auth.has_membership('blue')) def functionX(): ... -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: auth on GAE 'unable to send email'

2017-01-10 Thread Leonel Câmara
There's nothing different about the way Auth sends emails. Nothing. The most likely cause then, given that you can send emails in other places, is that your email message bodies such as auth.messages.verify_email have some mistake in them, causing Mail.send to get an exception, Mail.send has ev

[web2py] Re: auth on GAE 'unable to send email'

2017-01-09 Thread David Manns
I don't agree. Other emails from elsewhere using mail.send() in the application go out just fine. This despite the 'allow insecure apps' option being off on the email account used. Only the emails generated by the auth() registration and password reset processes are affected. There must be some

[web2py] Re: auth on GAE 'unable to send email'

2017-01-09 Thread Leonel Câmara
This is not a problem with web2py, this is a problem with gmail SMTP which doesn't allow normal SMTP protocol anymore unless you allow what they call "insecure apps". See: https://support.google.com/accounts/answer/6010255?hl=en -- Resources: - http://web2py.com - http://web2py.com/book (Docum

[web2py] Re: auth on GAE 'unable to send email'

2017-01-07 Thread David Manns
By playing with earlier versions, I established that 2.12.3 did not seem to have this problem. The problem was in both earlier and later versions. Don't know if 2.12.3 was the only version without the problem. On Friday, January 6, 2017 at 6:51:16 PM UTC-5, David Manns wrote: > > Running 2.14.6

[web2py] Re: auth groups and permission

2016-12-30 Thread Mark Graves
Depends on workflow, but Stefan was similar to what I was thinking. probably: auth.settings.create_user_groups = None Then after form submission, depending on workflow, algorithmically add the person to the group...eg. if form.vars.is_editor == True: db.auth_membership.insert(YOUR_DATA_HE

[web2py] Re: auth groups and permission

2016-12-30 Thread Biplov Bhandari
Hi Stefan, The default web2py auth_group adds a person to his own group when the user is created. I want to override the default behavior. I have fixed number of auth_group, say authenticated, editor, publisher and admin. I want to assign a role, based on the form data. if not defaults to authe

[web2py] Re: auth groups and permission

2016-12-30 Thread 黄祥
pardon, not sure what u want to achieve, did auth everybody_group_id is what u want? e.g. # add group id 1 do it in console or controller auth.add_group('Admin', 'Admin') *models/db.py* auth.settings.everybody_group_id = 1 best regards, stifan -- Resources: - http://web2py.com - http://web2py.

[web2py] Re: auth, db access via current in module

2016-07-02 Thread lucas
i wrote a test app just to reproduce the bug and in doing that i was able to see the error of my ways. i am an id10t at times. sorry for the bother. lucas -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code

[web2py] Re: auth, db access via current in module

2016-07-02 Thread Anthony
Hard to say without seeing the code. Don't see the connection between this and current or using a module. Anthony On Saturday, July 2, 2016 at 8:27:02 AM UTC-4, lucas wrote: > > hello one and all, > > i read the article in the book: > http://web2py.com/books/default/chapter/29/4#Sharing-the-glo

[web2py] Re: Auth User split by tables

2016-03-08 Thread Ron Chatterjee
This works fine. def after_profile(form): if form.vars.user_type == 'Job_Seeker': redirect(URL('default','edit_profile')) return locals() def edit_profile(): db.employee.employee_profile.default = auth.user_id record = db(db.employee.employee_profile== auth.user_id).select

[web2py] Re: Auth User split by tables

2016-03-07 Thread Anthony
This doesn't quite make sense. You are processing one form, and in the callback, you overwrite the "form" variable with an entirely new form object, attempting to process it immediately without the user having seen or submitted it. I think you need a different strategy. Two other tips: - If

[web2py] Re: Auth User split by tables

2016-03-06 Thread Ron Chatterjee
I have the auth_user split up between employer and employee After the profile is created I want to be able to modify the employee profile. So, I have this in my model auth.settings.profile_onaccept = lambda form: after_profile(form) In my controller: def after_profile(form): if form.v

[web2py] Re: Auth with service

2016-02-20 Thread Leonel Câmara
You can actually use basic auth if you want. Then you just make sure soap uses an authenticated http transport layer. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report

[web2py] Re: Auth User split by tables

2016-02-05 Thread Ron Chatterjee
yes got it. Thank you. sorry. lol On Friday, February 5, 2016 at 11:19:29 AM UTC-5, Anthony wrote: > > In the shell, just print it, pass it to str(), or call its .xml() method. > > Or just load it in the browser and "view source". > > Anthony > > On Friday, February 5, 2016 at 10:44:58 AM UTC-5, R

[web2py] Re: Auth User split by tables

2016-02-05 Thread Anthony
In the shell, just print it, pass it to str(), or call its .xml() method. Or just load it in the browser and "view source". Anthony On Friday, February 5, 2016 at 10:44:58 AM UTC-5, Ron Chatterjee wrote: > > This may be trivial but how do I get the html code out of auth.navbar()? > It shows up

[web2py] Re: Auth User split by tables

2016-02-05 Thread Ron Chatterjee
This may be trivial but how do I get the html code out of auth.navbar()? It shows up as a gluon object. On Tuesday, February 2, 2016 at 6:29:19 PM UTC-5, Anthony wrote: > > I guess I can do this: >> https://groups.google.com/forum/#!topic/web2py/AYORqIEpc9E >> But that kills all the style. Then I

[web2py] Re: Auth User split by tables

2016-02-02 Thread Anthony
> > I guess I can do this: > https://groups.google.com/forum/#!topic/web2py/AYORqIEpc9E > But that kills all the style. Then I got to custom style it. > Just look at the HTML generated by auth.navbar() and replicate that HTML, just making the changes you need in the links. Anthony -- Resourc

[web2py] Re: Auth User split by tables

2016-02-02 Thread Ron Chatterjee
You are the best Anthony! I did this: auth.settings.register_onaccept = lambda form: after_registration(form) in my model in my controller worked fine. Now all I want to do is append my menu with user profile (see attached). But user profile will have the same attributes like regular profile.

[web2py] Re: Auth User split by tables

2016-02-02 Thread Anthony
auth.register() automatically does a redirect after registration, so to do your own redirect, you should either pass a callback as the onaccept argument to auth.register() or specify the callback via auth.settings.register_onaccept. Also, this condition: if (db.auth_user.user_type == 'User'):

[web2py] Re: Auth User split by tables

2016-02-02 Thread Ron Chatterjee
So, In my application. I have two user type. User and Tutor. Once they register, if user_type = 'User', I want it to go through the registration process and create a user_profile by redirecting to "user_profile". If user_type = 'Tutor', create a tutor_profile and get redirected in my default

[web2py] Re: Auth User split by tables

2016-02-02 Thread Anthony
On Monday, February 1, 2016 at 9:40:07 PM UTC-5, Ron Chatterjee wrote: > > Come to think Anthony, the best way to do it will be similar to this. > Having hidden field and tables and once selected the user_type, all the > other fields or tables shows up. > > > https://stackoverflow.com/questions/

[web2py] Re: Auth User split by tables

2016-02-01 Thread Ron Chatterjee
Come to think Anthony, the best way to do it will be similar to this. Having hidden field and tables and once selected the user_type, all the other fields or tables shows up. https://stackoverflow.com/questions/17380476/web2py-authenticating-two-types-of-profile But the implementation is wrong

[web2py] Re: Auth User split by tables

2016-02-01 Thread Ron Chatterjee
Yes Anthony. Thank you again! It works just like you explained. On Monday, February 1, 2016 at 3:53:30 PM UTC-5, Anthony wrote: > > Calling .process will already do an insert into the db.Education table -- > your code is inserting an additional record. Instead, *before* calling > .process, set

[web2py] Re: Auth User split by tables

2016-02-01 Thread Anthony
Calling .process will already do an insert into the db.Education table -- your code is inserting an additional record. Instead, *before* calling .process, set db.Education.education_of.default = auth.user_id. Also, the education_of field should not be readable or writable. Anthony On Monday, F

[web2py] Re: Auth User split by tables

2016-02-01 Thread Ron Chatterjee
Thanks for the help Anthony. I appreciate that. For some reason this below don't work: form = auth(); form2 = SQLFORM(db.Education).process() if form2.accepted: db.Education.insert(education_of = auth.user.id) return dict(form=form, form2 = form2) Or even if I do this: db.E

[web2py] Re: Auth User split by tables

2016-02-01 Thread Anthony
I just meant you won't be able to use the built-in auth.profile() functionality -- your example is custom code. Anthony On Monday, February 1, 2016 at 1:33:54 PM UTC-5, Ron Chatterjee wrote: > > Thank you Anthony, > > Very good discussion. Just one question regarding when you say we "have to >

[web2py] Re: Auth User split by tables

2016-02-01 Thread Ron Chatterjee
Thank you Anthony, Very good discussion. Just one question regarding when you say we "have to create own register/profile"... Let's say my model is: #-- db.define_table("Education", Field

[web2py] Re: Auth User split by tables

2016-02-01 Thread Anthony
If there aren't too many fields, it might just be easiest to put them all in auth_user and just make some conditionally readable/writable depending on the type of user. Otherwise, you could create separate profile tables and have them reference auth_user. In that case, you would have to create

[web2py] Re: Auth User split by tables

2016-02-01 Thread Ron Chatterjee
I don't what exactly you are trying to do...but one thing you can do is create independent tables and process them in def user(): and create views accordingly at user.html. Others may have better suggestions On Monday, February 1, 2016 at 12:30:04 AM UTC-5, rajmat...@gmail.com wrote: > > > Hell

Re: [web2py] Re: Auth extra fields

2016-01-07 Thread greenpoise
Thanks! On Wednesday, January 6, 2016 at 9:53:51 AM UTC-8, Anthony wrote: > > On Wednesday, January 6, 2016 at 12:42:56 PM UTC-5, Mathieu Clabaut wrote: >> >> Be careful that when you update extra fields, it is your responsibility >> to update auth.user and session.auth.user accordingly... >> > >

Re: [web2py] Re: Auth extra fields

2016-01-06 Thread Anthony
On Wednesday, January 6, 2016 at 12:42:56 PM UTC-5, Mathieu Clabaut wrote: > > Be careful that when you update extra fields, it is your responsibility to > update auth.user and session.auth.user accordingly... > Note just "extra" fields, but any fields in db.auth_user. Anthony -- Resources: -

Re: [web2py] Re: Auth extra fields

2016-01-06 Thread Mathieu Clabaut
Be careful that when you update extra fields, it is your responsibility to update auth.user and session.auth.user accordingly... Le mer. 6 janv. 2016 03:42, Anthony a écrit : > I assume you want auth.user.store. > > > Anthony > > > On Tuesday, January 5, 2016 at 5:24:19 PM UTC-5, greenpoise wrot

[web2py] Re: Auth extra fields

2016-01-05 Thread Anthony
I assume you want auth.user.store. Anthony On Tuesday, January 5, 2016 at 5:24:19 PM UTC-5, greenpoise wrote: > > if auth.is_logged_in(): > this_store=auth_user.store > else: > this_store=None > > > Is there a way to extract the extra fields value in the controller like > the code above? > > Tha

[web2py] Re: Auth extra fields

2016-01-05 Thread greenpoise
auth_user is not defined. On Tuesday, January 5, 2016 at 2:26:59 PM UTC-8, Niphlod wrote: > > why not ? > > On Tuesday, January 5, 2016 at 11:24:19 PM UTC+1, greenpoise wrote: >> >> if auth.is_logged_in(): >> this_store=auth_user.store >> else: >> this_store=None >> >> >> Is there a way to extract

[web2py] Re: Auth extra fields

2016-01-05 Thread Niphlod
why not ? On Tuesday, January 5, 2016 at 11:24:19 PM UTC+1, greenpoise wrote: > > if auth.is_logged_in(): > this_store=auth_user.store > else: > this_store=None > > > Is there a way to extract the extra fields value in the controller like > the code above? > > Thanks > -- Resources: - http://we

[web2py] Re: auth new user registration even after login

2015-11-23 Thread 黄祥
i guess you have set : step 1 : auth.settings.actions_disabled = ['register'] step 2 set the callback : def __after_insert_auth_user(f, id): row = db(db.auth_user.id == id).select().first() mail.send(mail.email, 'Login credential', 'Email : %s, Password : password' % (mail.email) ) db.auth_user.

[web2py] Re: auth new user registration even after login

2015-11-23 Thread Dave S
On Monday, November 23, 2015 at 5:38:45 PM UTC-8, Kalpish Singhal wrote: > > I want my admin user group can only register new members and their > password should be send to respective user mail id using auth_user table, > how to do this when auth is logged in because no signup option is their

[web2py] Re: auth tables not visible in appadmin

2015-11-15 Thread Red Beard
Thank you Anthony and Massimo - I created a new app and managed to make it work - I'm not too sure what I must have done the first time round. On Wednesday, 11 November 2015 14:54:23 UTC, Massimo Di Pierro wrote: > > It is possible you have a db = DAL(...) in some other model file and that > ove

[web2py] Re: auth tables not visible in appadmin

2015-11-11 Thread Massimo Di Pierro
It is possible you have a db = DAL(...) in some other model file and that overrides the db variable from db.py On Wednesday, 4 November 2015 08:19:41 UTC-6, Red Beard wrote: > > Hi, > > My problem is that the auth tables do not appear in appadmin, though the > system allows me to register users,

[web2py] Re: auth tables not visible in appadmin

2015-11-04 Thread Anthony
Can you pack and attach a minimal app that displays the problem? On Wednesday, November 4, 2015 at 9:19:41 AM UTC-5, Red Beard wrote: > > Hi, > > My problem is that the auth tables do not appear in appadmin, though the > system allows me to register users, and it seems to remember them. > > > > I

[web2py] Re: Auth callback settings for reset_password and request_reset_password

2015-06-08 Thread Massimo Di Pierro
yes. as you requested. :-) On Monday, 8 June 2015 17:31:22 UTC-5, James McGlynn wrote: > > Thank you for the quick action (I can't believe I found a bug!), > > One more question: > > Will reset_password also use > > reset_password_onaccept and > reset_password_onvalidation? > > > On Sunday, June 7

[web2py] Re: Auth callback settings for reset_password and request_reset_password

2015-06-08 Thread James McGlynn
Thank you for the quick action (I can't believe I found a bug!), One more question: Will reset_password also use reset_password_onaccept and reset_password_onvalidation? On Sunday, June 7, 2015 at 10:29:05 PM UTC-4, Massimo Di Pierro wrote: > > It is a bug. I just fixed it in trunk. Now reques

[web2py] Re: Auth callback settings for reset_password and request_reset_password

2015-06-07 Thread Massimo Di Pierro
It is a bug. I just fixed it in trunk. Now request_reset_password uses request_reset_password_onaccept request_reset_password_onvalidation On Sunday, 7 June 2015 19:46:33 UTC-5, James McGlynn wrote: > > Hello, > > I have a few questions about using callbacks with reset_password and > request_res

[web2py] Re: auth define_tables username=False not working on GAE

2015-03-22 Thread Sébastien Loix
Hi Massimo, Thanks for the explanation, now I get it :) I am slowly -trying to- building a login where user can both login with email + password and Facebook. For the Facebook part I "had" to create a username field as written in the tutorial but your solution is perfect. Thanks again! El sába

[web2py] Re: auth define_tables username=False not working on GAE

2015-03-21 Thread Massimo Di Pierro
It is a feature. ;-) If the auth_user table has a username, it uses the username to ID the user instead of the email. Mind that on-login you can always pass the email in place of the username and it will work. Anyway, if you do not want this and you want a field called username that does not

[web2py] Re: Auth Users Session

2014-12-29 Thread Massimo Di Pierro
If the purpose is to allow users to authenticate with one all and login with others, I suggest you use CAS. If apps are distinct, they should have different sessions else you risk of breaking something. Massimo On Thursday, 18 December 2014 08:36:22 UTC-6, Oliver wrote: > > Hi All, > > I reall

[web2py] Re: Auth form custom errors

2014-08-29 Thread Bernard Nongpoh
Hello Web2py , I'm new to web2py can you please help me in this problem 1. I want to use angularJS +Bootstrap+ Web2py 2. I want to separate the web2py from the view ie. angularJS and Bootstrap 3. All Views Should be handle by angularJS + Bootstrap kind of RESTFUL SERVICES 4. This is the first prob

[web2py] Re: Auth with multiple E-mail addresses

2014-02-23 Thread Anthony
Maybe open a discussion on the developers list. I'm not sure if this is a common enough use case to justify incorporating into the framework. What seems to be more common is allowing users to authenticate the same account with multiple social logins (as well as an email/password option). If you

[web2py] Re: auth signature and enable record versioning

2014-01-04 Thread 黄祥
just make a correction the example 3 is unlazy table. best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message beca

[web2py] Re: auth signature and enable record versioning

2014-01-04 Thread 黄祥
On Saturday, January 4, 2014 7:15:58 PM UTC+7, Massimo Di Pierro wrote: > > 2) Tables are only archived if they have a Field('modified_on','datetime') > such as created by the signature. > Without it you do not know when changes are made and versioning is useless. > it's make sense and make me cl

[web2py] Re: auth signature and enable record versioning

2014-01-04 Thread Massimo Di Pierro
2) Tables are only archived if they have a Field('modified_on','datetime') such as created by the signature. Without it you do not know when changes are made and versioning is useless. 1) Does this work? # on_define_bank def on_define_bank(table): pass # create table : bank db.define_table('ba

[web2py] Re: Auth() vs auth()

2013-12-18 Thread Carlos Zenteno
Thanks Anthony! Very clear now -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Grou

[web2py] Re: Auth() vs auth()

2013-12-18 Thread Anthony
The Auth class has a __call__ method, which means Auth objects are callable. There's nothing special about the name "auth" -- it's just a convention. You could just as well do: myauth = Auth(db) myauth() When you call auth(), it checks request.args(0) to see which Auth action has been requeste

Re: [web2py] Re: Auth User Table Modifications

2013-10-30 Thread Richard Vézina
In this case use Oauth or CAS?? Richard On Tue, Oct 29, 2013 at 6:04 PM, wrote: > It seems there are enough times where people either put in fake e-mails or > rather not put in e-mails. I personally believe this should be optional in > most cases. Sometimes the account isn't important enough t

[web2py] Re: Auth User Table Modifications

2013-10-29 Thread archeaneon
It seems there are enough times where people either put in fake e-mails or rather not put in e-mails. I personally believe this should be optional in most cases. Sometimes the account isn't important enough that you may want to go through the trouble of retrieving a password and might rather set

[web2py] Re: Auth User Table Modifications

2013-10-29 Thread Massimo Di Pierro
auth.define_tables(username=True) db.auth_user.first_name.writable = db.auth_user.first_name.readable = False ... same for last_name and for email ... yet without email how to you retrieve a password? On Tuesday, 29 October 2013 09:10:51 UTC-5, arche...@gmail.com wrote: > > I was wondering how

Re: [web2py] Re: auth, redirect after login

2013-10-12 Thread Junior Phanter
Sorry to ask, but you went through a recent update of web2py, more precisely the version 2.6.x to version 2.7.x? If you recently updated, you must copy the file web2py.js the admin folder and appadmin.html from welcome application to your application. 2013/10/12 LightOfMooN > Thanks, but it

[web2py] Re: auth, redirect after login

2013-10-11 Thread LightOfMooN
Thanks, but it was not necessary :) It was the special server to show the problem. The problem about login: If there are no _next var, I think, it should redirect to auth.settings.login_next url, but it doesn't happen. суббота, 12 октября 2013 г., 6:32:09 UTC+6 пользователь Massimo Di Pierro на

[web2py] Re: auth, redirect after login

2013-10-11 Thread Massimo Di Pierro
This helps. You are right there is a problem with logout next. That is now fixed in trunk based on your suggestion. The problem about login I cannot reproduce. I deleted your other post. Never post your admin password. That would give full access to your server to everybody. Make sure you chang

  1   2   3   4   >