mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 07:29:33 -05:00
Added authentication policy and policy function for gxs forums
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6117 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
39a7942337
commit
bf5981e8b4
@ -51,7 +51,7 @@ RsGxsForums *rsGxsForums = NULL;
|
||||
/********************************************************************************/
|
||||
|
||||
p3GxsForums::p3GxsForums(RsGeneralDataService *gds, RsNetworkExchangeService *nes)
|
||||
: RsGenExchange(gds, nes, new RsGxsForumSerialiser(), RS_SERVICE_GXSV1_TYPE_FORUMS), RsGxsForums(this)
|
||||
: RsGenExchange(gds, nes, new RsGxsForumSerialiser(), RS_SERVICE_GXSV1_TYPE_FORUMS, NULL, forumsAuthenPolicy()), RsGxsForums(this)
|
||||
{
|
||||
// For Dummy Msgs.
|
||||
mGenActive = false;
|
||||
@ -64,6 +64,22 @@ p3GxsForums::p3GxsForums(RsGeneralDataService *gds, RsNetworkExchangeService *ne
|
||||
|
||||
}
|
||||
|
||||
uint32_t p3GxsForums::forumsAuthenPolicy()
|
||||
{
|
||||
uint32_t policy;
|
||||
uint32_t flag = GXS_SERV::MSG_AUTHEN_ROOT_AUTHOR_SIGN |
|
||||
GXS_SERV::MSG_AUTHEN_CHILD_AUTHOR_SIGN;
|
||||
|
||||
RsGenExchange::setAuthenPolicyFlag(flag, policy,
|
||||
RsGenExchange::RESTRICTED_GRP_BITS);
|
||||
|
||||
RsGenExchange::setAuthenPolicyFlag(flag, policy,
|
||||
RsGenExchange::PUBLIC_GRP_BITS);
|
||||
|
||||
RsGenExchange::setAuthenPolicyFlag(flag, policy,
|
||||
RsGenExchange::PRIVATE_GRP_BITS);
|
||||
return policy;
|
||||
}
|
||||
void p3GxsForums::notifyChanges(std::vector<RsGxsNotify *> &changes)
|
||||
{
|
||||
receiveChanges(changes);
|
||||
|
@ -78,6 +78,8 @@ virtual bool createMsg(uint32_t &token, RsGxsForumMsg &msg);
|
||||
|
||||
private:
|
||||
|
||||
static uint32_t forumsAuthenPolicy();
|
||||
|
||||
virtual bool generateDummyData();
|
||||
|
||||
std::string genRandomId();
|
||||
|
Loading…
Reference in New Issue
Block a user