ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #04800
[Merge] lp:~carlos-mazieri/ubuntu-filemanager-app/samba-ui-01 into lp:ubuntu-filemanager-app
Carlos Jose Mazieri has proposed merging lp:~carlos-mazieri/ubuntu-filemanager-app/samba-ui-01 into lp:ubuntu-filemanager-app.
Commit message:
Improved "unlock full access" regarding remote locations
Requested reviews:
Ubuntu File Manager Developers (ubuntu-filemanager-dev)
For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-ui-01/+merge/270334
This is the first MP of a series of 5.
That set of MP contains changes in places, icons and provides a dialog to authenticate remote locations when they require authentication to access its data.
link to click package in case of testing (install libsmbclient first):
https://www.dropbox.com/s/f6gxiqbav3th8bx/com.ubuntu.filemanager_0.4.latest_armhf.click?dl=0
Other links:
https://www.dropbox.com/s/gmaiadmr42ph2dj/screenshot_authentication.png?dl=0
https://www.dropbox.com/s/wdstwscvs1wh9tx/screenshot_browsin_hosts.png?dl=0
--
Your team Ubuntu File Manager Developers is requested to review the proposed merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-ui-01 into lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/dirmodel.cpp'
--- src/plugin/folderlistmodel/dirmodel.cpp 2015-08-25 18:41:31 +0000
+++ src/plugin/folderlistmodel/dirmodel.cpp 2015-09-07 21:20:53 +0000
@@ -542,12 +542,20 @@
}
bool DirModel::allowAccess(const DirItemInfo &fi) const {
- return allowAccess(fi.absoluteFilePath());
+ bool allowed = !mOnlyAllowedPaths; // !mOnlyAllowedPaths means any path is allowed
+ if (!allowed)
+ {
+ // for remote locations items are visible if them do not require authentication
+ allowed = mCurLocation->isRemote() ? !fi.needsAuthentication() :
+ isAllowedPath(fi.absoluteFilePath());
+ }
+ return allowed;
}
bool DirModel::allowAccess(const QString &absoluteFilePath) const {
- return !mOnlyAllowedPaths || isAllowedPath(absoluteFilePath);
-}
+ return !mOnlyAllowedPaths || mCurLocation->isRemote() || isAllowedPath(absoluteFilePath);
+}// for remote locations access is allowed
+
void DirModel::onItemsAdded(const DirItemInfoList &newFiles)
{
@@ -883,7 +891,7 @@
void DirModel::paste()
{
// Restrict pasting if in restricted directory when pasting on a local file system
- if (!mCurLocation->isRemote() && !allowAccess(mCurrentDir)) {
+ if (!allowAccess(mCurrentDir)) {
qDebug() << Q_FUNC_INFO << "access not allowed, pasting not done" << mCurrentDir;
return;
}
Follow ups