Disabling developer mode or debugging feature in openerp? - debugging

How can I disable the debugging mode or developer mode for users other than admin? I tried to remove the button 'Activate developer mode', but the problem was, if I add '?debug' after the server address in the address bar, then again the user gets the developer mode.

Following code will disable debug mode (Drop-down box) if user is admin (admin ID must be 1. If not then change session.uid === admin_id):
Create one xml file inside your_module/static/src/xml folder and add following code:
<templates>
<t t-extend="ViewManagerAction">
<t t-jquery="select.oe_debug_view" t-operation="replace">
<select t-if="widget.session.uid === 1 and widget.session.debug" class="oe_debug_view"/>
</t>
</t>
</templates>
Now go to __openerp__.py and add your xml like this:
'qweb' : [
"static/src/xml/your.xml",
],
Restart server, update your module and refresh the page.
You can refer this blog: OpenERP Web Changes.

You tried with logout.
default is its remove when we log off.

Related

Active Directory Users homespace

I connected Alfresco with my active directory I am able to login using windows credential but how to add userspace to these windows login. I am not able to able to create new content using windows login. Also I have to login twice inorder to view the alfresco explorer page. First in browser then in alfresco login page. How to make it as single page.
Here is my global property
### ACtive Directory Configuration ###
authentication.chain=passthru1:passthru,ldap1:ldap,alfrescoNtlm1:alfrescoNtlm
passthru.authentication.sso.enabled=false
passthru.authentication.allowGuestLogin=false
passthru.authentication.authenticateCIFS=false
passthru.authentication.authenticateFTP=false
passthru.authentication.servers=192.168.100.100
passthru.authentication.domain=<Netbios Domain>
passthru.authentication.useLocalServer=false
passthru.authentication.defaultAdministratorUserNames=sameer
passthru.authentication.connectTimeout=5000
passthru.authentication.offlineCheckInterval=300
passthru.authentication.protocolOrder=TCPIP,NETBIOS
ldap.authentication.active=true
ldap.authentication.java.naming.security.authentication=simple
ldap.authentication.userNameFormat=%s
ldap.authentication.allowGuestLogin=false
ldap.authentication.java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory
ldap.authentication.java.naming.provider.url=ldap://192.168.100.100:389
ldap.authentication.escapeCommasInBind=false
ldap.authentication.escapeCommasInUid=false
ldap.synchronization.active=true
ldap.synchronization.java.naming.security.principal=uid\=sameer,cn\=users,dc=<company.domain>,dc=com
ldap.synchronization.java.naming.security.credentials=<administrator.privilege.account.password>
ldap.synchronization.queryBatchSize=1000
ldap.synchronization.groupDifferentialQuery=(&(objectclass=nogroup)(!(modifyTimestamp<\={0})))
ldap.synchronization.personQuery=(&(objectclass=user)(userAccountControl\:1.2.840.113556.1.4.803\:\=512))
ldap.synchronization.personDifferentialQuery=(& (objectclass=user)(!(modifyTimestamp<\={0})))
ldap.synchronization.groupQuery=(objectclass\=group)
ldap.synchronization.groupSearchBase=cn\=users,dc=<company.domain>,dc=com
ldap.synchronization.userSearchBase=cn\=users,dc=<company.domain>,dc=com
ldap.synchronization.modifyTimestampAttributeName=modifyTimestamp
ldap.synchronization.timestampFormat=yyyyMMddHHmmss'.0Z'
ldap.synchronization.userIdAttributeName=sAMAccountName
ldap.synchronization.userFirstNameAttributeName=givenName
ldap.synchronization.userLastNameAttributeName=sn
ldap.synchronization.userEmailAttributeName=mail
ldap.synchronization.userOrganizationalIdAttributeName=msExchALObjectVersion
ldap.synchronization.defaultHomeFolderProvider=userHomesHomeFolderProvider
ldap.synchronization.groupIdAttributeName=cn
ldap.synchronization.groupType=Nogroup
ldap.synchronization.personType=user
ldap.synchronization.groupMemberAttributeName=member
synchronization.synchronizeChangesOnly=true
cifs.enabled=false
First error kind of in your properties:
Use the ldap.authentication.active=true or the passthru as active subsystem
This is the reason you need to login double.
So in this case just put the
ldap.authentication.active=false
I'm not sure why you're not an admin, can you try the following:
ldap.authentication.defaultAdministratorUserNames=sameer
or
ldap.authentication.defaultAdministratorUserNames=uid\=sameer,cn\=users,dc=<company.domain>,dc=com
Are you sure it's uid=sameer and not cn=sameer.

Reset Password Link Joomla - While in "maintenance mode" / offline mode

How do users reset passwords while in "off-line" mode.
We are running the site as Intranet.
Joomla 2.5.4
Mhm.. this is quite long to do, but maybe you can work it out.
Grant your user level offline access (you can do that in Global configuration -> Permissions)
Create a menu entry that point to the user profile and set visible to your users
Set every menu/modules etc etc invisible to "normal" users (except the previous one)
I've never tried it before, but it should work.
I just wanted to share my solution for Joomla 3.9:
In the file "offline.php" of your template (or in /templates/system if the template has no offline.php) you can place this code before where the login form is displayed:
if( JRequest::getVar('option') == 'com_users') {
?><jdoc:include type="message"/><?php
$registrationController = new UsersController();
$registrationController->display();
} else {
// Login Form
}
so it displays the dialogs to reset the password if the page is loaded by using "index.php?option=com_users&task=request.reset" or similar, but shows the "offline" login form by default.

how to make a Location Service Permission MessageBox

I have submited a App but is not certified because this:
"This application uses the Location Service API to determine a user's location and show them events taking place nearby
however, it does not appear to contain a privacy policy that is accessible to users explaining how the application uses the
Location Service API."
And what i want to do is something like this
When user clicks in Policty Statement open a new window with settings page with my app location policies.
Can anyone help me? How can i add a link like in image?
Cumps
You can navigate to a page using the Hyperlink control
<Textblock>
<Hyperlink NavigateUri="/PrivacyPage.xaml"
TargetName="_blank">Privacy Statement</Hyperlink>
</Textblock>
See MSDN for more info
I don't think you can put a hyperlink in a call to MessageBox.Show() though so you have to create your own Messagebox-like page.
The first time the app is launched you direct the user to your message page. E.g. using this in MainPage.xaml
OnNavigatedTo(...)
{
if(!AppSettings.HasMessageBeenShown)
{
AppSettings.HasMessageBeenShown=true;
NavigationContext.Navigate(new Uri("/MessagePage.xaml", UriKind.Relative));
}
}

FB.ui permissions.request issue in new OAuth window

I having an issue with FB.ui permissions.request window.
FB.ui({
method: 'permissions.request',
perms: 'publish_actions',
display: 'popup'
},function(response) {
// This function is never called ? });
Context :
I use the new OAuth window (with timeline), i have configured my apps to work with it.
I'm french and use Facebook in French.
First issue :
- My callback function is never called ...
Second issue :
- The new OAuth window, seem to be not the good window.
It's called 'permission request' but inside it is the copy of login window. And no permission request is displayed.
So, my question is : how can i do the permission request in js ?
How displaying this window : https://developers.facebook.com/attachment/app_extended_perms.png/ ?
Thanks.
The reason you are not seeing it is because the application process has become a two step process.
Being that the person accepts to login into your application.
Being the person accept your extended permission which is where the callback url comes into play.
Documentation can be found here.
So the reason your callback isn't being called is because the two step process. I would suggest making the response attached to second page that is called.
I am not sure how the JS SDK works but it is how I managed to do it.
Goodluck.
Disable "Enhanced Auth Dialog" in your app's advance settings and see if it works. If you want to stick with Enhanced Auth Dialog then checkout Setup Auth Dialog Preview for Authenticating user section of this tutorial.

Blank login page on CSWinPhone7SimpleApp

I'm trying to use the Facebook C# SDK from Codeplex on my WP7 app. I managed to build & run the application by manually adding Facebook.dll and Microsoft.Contracts.dll. But I only see a blank login(?) page :
The code enters FacebookLoginBrowser_Navigated, after loading this url :
http://www.facebook.com/dialog/oauth/?response_type=token&display=touch&scope=user_about_me,read_notifications&client_id=119779898114420&redirect_uri=http://www.facebook.com/connect/login_success.html
but the URL seems to have been redirected to this one :
http://m.facebook.com/login.php?app_id=119779898114420&cancel=http://www.facebook.com/connect/login_success.html?error_reason=user_denied&error=access_denied&error_description=The+user+denied+your+request.&fbconnect=1&next=http://www.facebook.com/connect/uiserver.php?method=permissions.request&app_id=119779898114420&display=touch&redirect_uri=http%253A%252F%252Fwww.facebook.com%252Fconnect%252Flogin_success.html&response_type=token&fbconnect=1&perms=user_about_me%252Cread_notifications&from_login=1&rcount=1
The important part is "User denied access", which I didn't, since I don't see anything except a blank page.
Thanks in advance !
edit: pasting the first url into an iPhone simulator Safari.app, I see the Facebook login screen, then after login, I see the grant permission screen...
your browser is not script enabled, try to set the flag at true :

Resources