Bug 1082224 - Don't block all urls in guest sessions. r=mfinkle

This commit is contained in:
Wes Johnston 2014-10-13 16:09:00 -07:00
Родитель ef75628de9
Коммит f875fc820e
1 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -163,11 +163,6 @@ public class RestrictedProfiles {
@WrapElementForJNI
public static boolean isAllowed(int action, String url) {
// Guest users can't do anything.
if (getInGuest()) {
return false;
}
final Restriction restriction;
try {
restriction = geckoActionToRestriction(action);
@ -178,10 +173,15 @@ public class RestrictedProfiles {
return false;
}
if (getInGuest()) {
if (Restriction.DISALLOW_BROWSE_FILES == restriction) {
return canLoadUrl(url);
}
// Guest users can't do anything.
return false;
}
// NOTE: Restrictions hold the opposite intention, so we need to flip it.
return !getRestriction(restriction.name);
}