mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-05 01:25:39 -05:00
disabled flag DIR_FLAGS_NETWORK_WIDE_GROUPS for consistency reasons. We might extend it to rsCircles later.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-FileSharingPermissions@5784 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
65146b77d9
commit
a2f958b956
@ -1448,6 +1448,7 @@ void FileIndexMonitor::locked_findShareFlagsAndParentGroups(FileEntry *file,File
|
||||
{
|
||||
flags = it->second.shareflags ;
|
||||
flags &= PERMISSION_MASK ;
|
||||
flags &= ~DIR_FLAGS_NETWORK_WIDE_GROUPS ; // Disabling this flag for now, because it has inconsistent effects.
|
||||
parent_groups = it->second.parent_groups ;
|
||||
}
|
||||
#ifdef FIM_DEBUG2
|
||||
|
@ -345,6 +345,7 @@ bool ftFiMonitor::loadList(std::list<RsItem *>& load)
|
||||
info.parent_groups = fi->parent_groups;
|
||||
info.shareflags = FileStorageFlags(fi->flags) ;
|
||||
info.shareflags &= PERMISSION_MASK ;
|
||||
info.shareflags &= ~DIR_FLAGS_NETWORK_WIDE_GROUPS ; // disabling this flag for know, for consistency reasons
|
||||
|
||||
dirList.push_back(info) ;
|
||||
}
|
||||
|
@ -1127,7 +1127,7 @@ FileSearchFlags p3Peers::computePeerPermissionFlags(const std::string& peer_ssl_
|
||||
found = true ;
|
||||
}
|
||||
|
||||
bool network_wide = (share_flags & DIR_FLAGS_NETWORK_WIDE_OTHERS) || ( (share_flags & DIR_FLAGS_NETWORK_WIDE_GROUPS) && found) ;
|
||||
bool network_wide = (share_flags & DIR_FLAGS_NETWORK_WIDE_OTHERS) ;//|| ( (share_flags & DIR_FLAGS_NETWORK_WIDE_GROUPS) && found) ;
|
||||
bool browsable = (share_flags & DIR_FLAGS_BROWSABLE_OTHERS) || ( (share_flags & DIR_FLAGS_BROWSABLE_GROUPS) && found) ;
|
||||
|
||||
FileSearchFlags final_flags ;
|
||||
|
@ -196,12 +196,12 @@ int FlatStyle_RDM::columnCount(const QModelIndex &/*parent*/) const
|
||||
}
|
||||
QString RetroshareDirModel::getFlagsString(FileStorageFlags flags)
|
||||
{
|
||||
char str[11] = "- - - -" ;
|
||||
char str[11] = "- - -" ;
|
||||
|
||||
if(flags & DIR_FLAGS_BROWSABLE_GROUPS) str[0] = 'B' ;
|
||||
if(flags & DIR_FLAGS_NETWORK_WIDE_GROUPS) str[3] = 'N' ;
|
||||
if(flags & DIR_FLAGS_BROWSABLE_OTHERS) str[6] = 'B' ;
|
||||
if(flags & DIR_FLAGS_NETWORK_WIDE_OTHERS) str[9] = 'N' ;
|
||||
//if(flags & DIR_FLAGS_NETWORK_WIDE_GROUPS) str[3] = 'N' ;
|
||||
if(flags & DIR_FLAGS_BROWSABLE_OTHERS) str[3] = 'B' ;
|
||||
if(flags & DIR_FLAGS_NETWORK_WIDE_OTHERS) str[6] = 'N' ;
|
||||
|
||||
return QString(str) ;
|
||||
}
|
||||
|
@ -62,6 +62,7 @@ GroupFlagsWidget::GroupFlagsWidget(QWidget *parent,FileStorageFlags flags)
|
||||
update_button_state(_buttons[i]->isChecked(),i) ;
|
||||
_layout->addWidget(_buttons[i]) ;
|
||||
}
|
||||
_buttons[INDEX_GROUP_NETWORK_W]->setHidden(true);
|
||||
|
||||
connect(_buttons[INDEX_GROUP_NETWORK_W],SIGNAL(toggled(bool)),this,SLOT(update_GN_button(bool))) ;
|
||||
connect(_buttons[INDEX_OTHER_NETWORK_W],SIGNAL(toggled(bool)),this,SLOT(update_ON_button(bool))) ;
|
||||
@ -86,6 +87,7 @@ FileStorageFlags GroupFlagsWidget::flags() const
|
||||
for(int i=0;i<4;++i)
|
||||
if(_buttons[i]->isChecked()) flags |= _flags[i] ;
|
||||
|
||||
flags &= ~DIR_FLAGS_NETWORK_WIDE_GROUPS ;
|
||||
return flags ;
|
||||
}
|
||||
|
||||
@ -134,12 +136,12 @@ QString GroupFlagsWidget::groupInfoString(FileStorageFlags flags,const std::list
|
||||
if((flags & DIR_FLAGS_BROWSABLE_OTHERS) && !groups.empty())
|
||||
res += tr("All your friends can browse this directory\n") ;
|
||||
else if((flags & DIR_FLAGS_BROWSABLE_GROUPS) && !groups.empty())
|
||||
res += tr("Friends in groups ") + groups_string + tr(" can browse this directory\n") ;
|
||||
res += tr("Only friends in groups ") + groups_string + tr(" can browse this directory\n") ;
|
||||
|
||||
if(flags & DIR_FLAGS_NETWORK_WIDE_OTHERS)
|
||||
res += tr("All your friends can relay anonymous tunnels to this directory") ;
|
||||
else if(flags & DIR_FLAGS_NETWORK_WIDE_GROUPS)
|
||||
res += tr("Friends in groups ") + groups_string + tr(" can relay anonymous tunnels to this directory") ;
|
||||
res += tr("only friends in groups ") + groups_string + tr(" can relay anonymous tunnels to this directory") ;
|
||||
|
||||
if(flags.toUInt32() == 0)
|
||||
res += tr("No friends can access nor see this directory.") ;
|
||||
|
Loading…
x
Reference in New Issue
Block a user