mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-11 23:49:38 -05:00
reverted last commit. Fixed the perm bug in ConnectFreindWizard (Patch from Henry Morgan)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6316 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
3240b1f71b
commit
ae5e1c7ae5
@ -515,13 +515,18 @@ ServicePermissionFlags ConnectFriendWizard::serviceFlags() const
|
||||
{
|
||||
ServicePermissionFlags flags(0) ;
|
||||
|
||||
if(ui->_anonymous_routing_CB_2->isChecked()) flags |= RS_SERVICE_PERM_TURTLE ;
|
||||
if( ui->_discovery_CB_2->isChecked()) flags |= RS_SERVICE_PERM_DISCOVERY ;
|
||||
if( ui->_forums_channels_CB_2->isChecked()) flags |= RS_SERVICE_PERM_DISTRIB ;
|
||||
|
||||
if (hasVisitedPage(Page_FriendRequest))
|
||||
{
|
||||
if(ui->_anonymous_routing_CB->isChecked()) flags |= RS_SERVICE_PERM_TURTLE ;
|
||||
if( ui->_discovery_CB->isChecked()) flags |= RS_SERVICE_PERM_DISCOVERY ;
|
||||
if( ui->_forums_channels_CB->isChecked()) flags |= RS_SERVICE_PERM_DISTRIB ;
|
||||
} else if (hasVisitedPage(Page_Conclusion)) {
|
||||
if(ui->_anonymous_routing_CB_2->isChecked()) flags |= RS_SERVICE_PERM_TURTLE ;
|
||||
if( ui->_discovery_CB_2->isChecked()) flags |= RS_SERVICE_PERM_DISCOVERY ;
|
||||
if( ui->_forums_channels_CB_2->isChecked()) flags |= RS_SERVICE_PERM_DISTRIB ;
|
||||
}
|
||||
return flags ;
|
||||
}
|
||||
|
||||
void ConnectFriendWizard::accept()
|
||||
{
|
||||
bool sign = false;
|
||||
@ -560,6 +565,7 @@ void ConnectFriendWizard::accept()
|
||||
} else if (accept_connection) {
|
||||
std::cerr << "ConclusionPage::validatePage() accepting GPG key for connection." << std::endl;
|
||||
rsPeers->addFriend("", peerDetails.gpg_id,serviceFlags()) ;
|
||||
rsPeers->setServicePermissionFlags(peerDetails.gpg_id,serviceFlags()) ;
|
||||
}
|
||||
|
||||
if (!groupId.isEmpty()) {
|
||||
|
@ -326,20 +326,20 @@ void SecurityItem::removeFriend()
|
||||
rsPeers->removeFriend(mGpgId);
|
||||
}
|
||||
}
|
||||
|
||||
void SecurityItem::friendRequest()
|
||||
{
|
||||
#ifdef DEBUG_ITEM
|
||||
std::cerr << "SecurityItem::friendReguest()";
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
ConfCertDialog::showIt(mGpgId, ConfCertDialog::PageTrust);
|
||||
/* ConnectFriendWizard *connectFriendWizard = new ConnectFriendWizard;
|
||||
|
||||
ConnectFriendWizard *connectFriendWizard = new ConnectFriendWizard;
|
||||
connectFriendWizard->setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
connectFriendWizard->setGpgId(mGpgId, true);
|
||||
connectFriendWizard->show();*/
|
||||
connectFriendWizard->show();
|
||||
}
|
||||
|
||||
|
||||
void SecurityItem::peerDetails()
|
||||
{
|
||||
#ifdef DEBUG_ITEM
|
||||
|
Loading…
Reference in New Issue
Block a user