How completely remove user:admin filter in hue UI? - hadoop-yarn

When I login to hue or refresh page I got filter with user:admin selected:
Is there a way to modify hue configs and remove this default filter? (It is very annoyuing to remove it on every page loading :'( )

It defaults to your current logged in user. You may be able to use extensions like TamperMonkey to run Javascript after page load to clear the input box, but that'll cause unnecessary requests to the YARN server for more jobs than just the ones your user may have access to.

Related

TYPO3 permissions: Allow backend users to copy content elements but not to edit them (or: how to provide users a library of content elements to copy)

i’d be thankful for some help (maybe i didn’t find the correct terms for a search on the internet?).
Topic: Permissions / Module “Access”
I’m looking for a way to configure permissions in such a way that some backend user are in the same time:
allowed to see (in the page module) all content elements on a certain page
not allowed to edit/hide/delete them
are allowed to copy them into the clipboard
The idea is to give them a kind of library pre-filled+preconfigured content elements to copy and paste on “their” pages.
As soon as i disable the permission to “edit content” on the page in the module “access”, they don’t have a “copy” item in the context menu of the content element anymore.
Is there a way to achieve the goal?
Allow your editor to use the content element «Insert Records». So you can place the prefilled and pre-configured content elements on a page without edit permission.
Editor can «clone» the content elements on their page without the possibility to edit them.
In frontend there is no difference between the original content element and the «clone».
Your scenario is definitely possible. I've just set up a demo TYPO3 installation where this works fine.
You need to create two backend user groups for access:
one for the read only page
and one for the regular pages
In the access module you assign the read only group and set the access rights for read only page only to "Show page".
Then it should be possible to just copy from that page:
I hope this is helpful for you to reproduce it in your installation.

Yii-User and Yii-eauth integration

I am trying to put together an application using yii-user and yii-eauth extensions but I am coming up short. When I create a new webapp and install eauth I can get it to work fine so I know that I am not doing anything wrong on that end. I think the problem lies with my urls. This is a demo of what it is supposed to be like: http://nodge.ru/yii-eauth/demo/login. When someone clicks on say google it should bring you to the google sign in page but on my application I am getting a 404 error that states "The system is unable to find the requested action "login"." The url for this is user/user/login/service/google_oauth whereas the url should read user/login/service/google_oauth. Upon typing this into the browser manually I am redirected to the right page.
So I took a look into the EAuthWidget.php class to see if I could find out where it was getting that extra "user" from but I could not figure it out. I think it may have something to do with the fact that I have this in the user module which is in the /modules/user directory in my webapp. I also tried to use the URLManager to point to the right address but with no luck.
Does anyone have any similar experiences setting this up? Or any suggestions?
You just need to change the widget initialization code in your view(namely change the action property of the widget), somewhat like this:
<h2>Do you already have an account on one of these sites? Click the logo to log in with it here:</h2>
<?php
$this->widget('ext.eauth.EAuthWidget', array('action' => 'login'));
?>
Just to add, keep in mind that this action depends on which view you are including this widget, if the view is protected/views/site/login.php (which is yii's default site login view) then action should be able to go to the yii-user module's login action, so it'll be : 'action'=>'/user/login' , however if you are including this widget in yii-user's protected/modules/user/views/user/login.php then the action will be 'login' as already mentioned.

Drupal + SOLR Indexing -- Fields not showing up in "Enabled Filters" Tab

After doing an import of a content type (fairly large), the Apache SOLR admin page is not displaying that new content type's fields in the "Enabled Filters" Tab. I have already successfully done this in 4 other server environments, but this time, a half hour after importing the content type, I am still not seeing the fields.
The location of this menu is:
admin > Site Configuration > Apache SOLR > Enabled Filters
I have tried deleting and reimporting this content type, with no change in results. I have also (briefly) encountered this problem on 1 server prior to this, although after refreshing this tab a few times, all the fields magically appeared.
Does anyone have any suggestions as to how I might get these new fields to display as options in SOLR's config menu under the "Enabled Filters" tab?
you need to index content. Actually it's indexing automatically via cron, but since it can be not configured on server, you have to do it manually.
Turns out, SOLR does not, by default, index numeric fields. However, we wrote a plugin for this, which I forgot to enable on this server. Thus, several fields were not showing up in the enable filters page. It's always the little oversights that cause you the most trouble.

Detecting Facebook canvas in Rails app

I'm using a before_filter to detect the signed_request query string Facebook generates when a user is referred to a canvas app.
Then, I set session[:canvas] = true and test for that when I need different app logic based on whether the user is in the canvas or on the native browser app. The problem is that if the user, for any reason, leaves the canvas and navigates to the browser-based app, the session[:canvas] variable is still set to true.
Is there a better way to detect the difference between the canvas and the native browser app?
I personally like to use an "alias" url for the Facebook app, e.g. use fb.mysite.com instead of www.mysite.com in the app settings and set things up so that the two domains point to the same place. Or something similar can be done with directories, e.g. www.mysite.com/fb/ pointing to the same place as www.mysite.com/ but giving an easy way for the code to determine if it's a direct access or from an app.
Using a session can work too, but you have to add an additional javascript check in the case you are currently in "app mode" (canvas==true). The javascript just checks to see if the page is inside an iframe, and if it is not then it redirects to something like www.mysite.com/thispage?app=0. Your pages should check for the app=0 parameter and clear the session if present (or set canvas=false). This way, if a user starts out inside Facebook but then visits your site directly, things automatically get adjusted correctly.
Instead of storing this information at the session, check for the existence of the signed_request parameter, if there is no parameter, it possibly means the user is not inside the facebook app anymore.
I might be completely wrong, but doesn't Facebook access your canvas content by a POST instead of a GET request? Wouldn't that be the easiest way to distinguish where the request came from?

How to detect if user has switched Rails 3

A user logs into my application in a tab in a browser
They get an email and click a link which opens a new tab in the same browser and logs them in under a different email say.
If they go back to the first tab they are no longer the same user and I want the page to automatically detect this and then reload or redirect them if they are unauthorized to view the page.
Anyway to do this?
Or, if you really want to know when user is switched the tab, try this library:
visibility.js
As stated by #Hck:
add javascript code to reload page periodically (for example once per 30 seconds) – Hck
JavaScript is pretty much the only way to make pages do stuff after they're loaded. Note that in pretty much any user authentication system, a given browser will only be logged in as one user at a time, so as soon as the second tab opens, that browser will be acting as the second user - they can still see the current content of the first tab, but links (for instance) will no longer work unless the second user was also authorized to use them.
There are some JQuery plugins that do this sort of thing, like PeriodicalUpdater, or you can write your own (an example).