Exemplo n.º 1
0
        protected void get_sitemap_index(int?count)
        {
            if (!count.HasValue)
            {
                count = 1000;
            }

            long nodesCount = CNController.get_nodes_count(paramsContainer.Tenant.Id)
                              .Sum(u => u.Count.HasValue ? u.Count.Value : 0);

            double pagesCount = Math.Ceiling((double)nodesCount / (double)count);

            string response = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" +
                              "<sitemapindex xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">";

            for (int i = 0; i < pagesCount; ++i)
            {
                response += "<sitemap>" +
                            "<loc>" +
                            PublicConsts.get_complete_url(paramsContainer.Tenant.Id, PublicConsts.RSSPage) + "/node?" +
                            ("Sitemap=true&LowerBoundary=" + ((count * i) + 1).ToString() + "&Count=" + count.ToString()).Replace("&", "&amp;") +
                            "</loc>" +
                            "<lastmod>" + String.Format("{0:yyyy-MM-dd}", DateTime.Now) + "</lastmod>" +
                            "</sitemap>";
            }

            response += "</sitemapindex>";

            paramsContainer.xml_response(response);
        }
Exemplo n.º 2
0
        protected void nodes_rss(Guid?nodeTypeId, string title, string description, int?count, long?lowerBoundary,
                                 string searchText, bool?isDocument, bool?isKnowledge, bool?sitemap)
        {
            if (!count.HasValue || count.Value <= 0)
            {
                count = 20;
            }
            if (count.HasValue && count > 5000)
            {
                count = 5000;
            }

            List <Node> nodes = nodeTypeId.HasValue ?
                                CNController.get_nodes(paramsContainer.Tenant.Id, nodeTypeId.Value, null, searchText,
                                                       isDocument, isKnowledge, null, null, count.Value, lowerBoundary, false) :
                                CNController.get_nodes(paramsContainer.Tenant.Id,
                                                       searchText, isDocument, isKnowledge, null, null, count.Value, lowerBoundary, false);

            if (sitemap.HasValue && sitemap.Value)
            {
                paramsContainer.xml_response(
                    "<?xml version=\"1.0\" encoding=\"UTF-8\" ?><urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">" +
                    ProviderUtil.list_to_string <string>(nodes.Select(
                                                             u => "<url>" +
                                                             "<loc>" +
                                                             PublicConsts.get_complete_url(paramsContainer.Tenant.Id, PublicConsts.NodePage) +
                                                             "/" + u.NodeID.Value.ToString() +
                                                             "</loc>" +
                                                             "<changefreq>weekly</changefreq>" +
                                                             "<lastmod>" + String.Format("{0:yyyy-MM-dd}", DateTime.Now) + "</lastmod>" +
                                                             //"<priority>0.8</priority>" +
                                                             "</url>").ToList(), null) +
                    "</urlset>"
                    );

                return;
            }

            List <RSSItem> rssItems = new List <RSSItem>();

            foreach (Modules.CoreNetwork.Node _nd in nodes)
            {
                rssItems.Add(new RSSItem()
                {
                    Title = _nd.Name,
                    Link  = PublicConsts.get_complete_url(paramsContainer.Tenant.Id, PublicConsts.NodePage) +
                            "/" + _nd.NodeID.Value.ToString()
                });
            }

            RSSUtilities.send_feed(HttpContext.Current, rssItems, title, description);
        }
Exemplo n.º 3
0
        private static void _send_notification(Guid applicationId, Notification info)
        {
            if (!RaaiVanConfig.Modules.Notifications(applicationId))
            {
                return;
            }

            if (!info.Action.HasValue || info.Action.Value == ActionType.None ||
                !info.SubjectType.HasValue || info.SubjectType.Value == SubjectType.None)
            {
                return;
            }

            List <Pair> users = new List <Pair>();

            if (info.UserID.HasValue && info.UserID != info.Sender.UserID)
            {
                users.Add(new Pair(info.UserID.Value, UserStatus.Owner));
            }

            List <Guid> userIds = new List <Guid>();

            List <Guid> mentionedUserIds = info.Action == ActionType.Post || info.Action == ActionType.Share || info.Action == ActionType.Comment ?
                                           Expressions.get_tagged_items(info.Description, "User").Where(u => u.ID.HasValue && u.ID != info.UserID)
                                           .Select(u => u.ID.Value).ToList() : new List <Guid>();

            info.Description = PublicMethods.markup2plaintext(applicationId,
                                                              Expressions.replace(info.Description, Expressions.Patterns.HTMLTag, " "));

            switch (info.Action.Value)
            {
            case ActionType.Like:
                switch (info.SubjectType.Value)
                {
                case SubjectType.Node:
                    if ((userIds = __get_audience_user_ids(ref info, UserStatus.Owner)) == null)
                    {
                        userIds = CNController.get_node_creators(applicationId, info.RefItemID.Value).Select(
                            u => u.User.UserID.Value).ToList();
                    }
                    foreach (Guid _uid in userIds)
                    {
                        users.Add(new Pair(_uid, UserStatus.Owner));
                    }

                    if ((userIds = __get_audience_user_ids(ref info, UserStatus.Member)) == null)
                    {
                        userIds = CNController.get_member_user_ids(applicationId,
                                                                   info.RefItemID.Value, NodeMemberStatuses.Accepted);
                    }
                    foreach (Guid _uid in userIds)
                    {
                        users.Add(new Pair(_uid, UserStatus.Member));
                    }

                    if ((userIds = __get_audience_user_ids(ref info, UserStatus.Expert)) == null)
                    {
                        userIds = CNController.get_experts(applicationId, info.RefItemID.Value).Select(
                            u => u.User.UserID.Value).ToList();
                    }
                    foreach (Guid _usr in userIds)
                    {
                        users.Add(new Pair(_usr, UserStatus.Expert));
                    }

                    Node node = CNController.get_node(applicationId, info.RefItemID.Value, true);
                    if (node != null)
                    {
                        info.SubjectName = node.Name;
                        info.Description = node.Description;
                        info.Info        = "{\"NodeType\":\"" + Base64.encode(node.NodeType) + "\"}";
                    }
                    break;

                case SubjectType.Question:
                    if ((userIds = __get_audience_user_ids(ref info, UserStatus.Owner)) == null)
                    {
                        userIds = new List <Guid>()
                        {
                        };
                        Guid?id = QAController.get_question_asker_id(applicationId, info.RefItemID.Value);
                        if (id.HasValue)
                        {
                            userIds.Add(id.Value);
                        }
                    }
                    foreach (Guid _uid in userIds)
                    {
                        users.Add(new Pair(_uid, UserStatus.Owner));
                    }

                    Question question = QAController.get_question(applicationId, info.RefItemID.Value, null);
                    if (question != null)
                    {
                        info.SubjectName = question.Title;
                        info.Description = question.Description;
                    }
                    break;

                case SubjectType.Post:
                    if ((userIds = __get_audience_user_ids(ref info, UserStatus.Owner)) == null)
                    {
                        userIds = new List <Guid>();
                        Guid?id = SharingController.get_post_sender_id(applicationId, info.RefItemID.Value);
                        if (id.HasValue)
                        {
                            userIds.Add(id.Value);
                        }
                    }
                    foreach (Guid _uid in userIds)
                    {
                        users.Add(new Pair(_uid, UserStatus.Owner));
                    }

                    Post post = SharingController.get_post(applicationId, info.RefItemID.Value, null);
                    info.Description = string.IsNullOrEmpty(post.Description) ?
                                       post.OriginalDescription : post.Description;
                    break;

                case SubjectType.Comment:
                    if ((userIds = __get_audience_user_ids(ref info, UserStatus.Owner)) == null)
                    {
                        userIds = new List <Guid>();
                        Guid?id = SharingController.get_comment_sender_id(applicationId, info.SubjectID.Value);
                        if (id.HasValue)
                        {
                            userIds.Add(id.Value);
                        }
                    }
                    foreach (Guid _uid in userIds)
                    {
                        users.Add(new Pair(_uid, UserStatus.Owner));
                    }

                    Sharing.Comment comment = SharingController.get_comment(applicationId, info.SubjectID.Value, null);
                    info.RefItemID   = comment.PostID;
                    info.Description = comment.Description;
                    break;
                }
                break;

            case ActionType.Dislike:
                switch (info.SubjectType.Value)
                {
                case SubjectType.Post:
                    if ((userIds = __get_audience_user_ids(ref info, UserStatus.Owner)) == null)
                    {
                        userIds = new List <Guid>();
                        Guid?id = SharingController.get_post_sender_id(applicationId, info.RefItemID.Value);
                        if (id.HasValue)
                        {
                            userIds.Add(id.Value);
                        }
                    }
                    foreach (Guid _uid in userIds)
                    {
                        users.Add(new Pair(_uid, UserStatus.Owner));
                    }

                    Post post = SharingController.get_post(applicationId, info.RefItemID.Value, null);
                    info.Description = string.IsNullOrEmpty(post.Description) ? post.OriginalDescription : post.Description;
                    break;

                case SubjectType.Comment:
                    if ((userIds = __get_audience_user_ids(ref info, UserStatus.Owner)) == null)
                    {
                        userIds = new List <Guid>();
                        Guid?id = SharingController.get_comment_sender_id(applicationId, info.SubjectID.Value);
                        if (id.HasValue)
                        {
                            userIds.Add(id.Value);
                        }
                    }
                    foreach (Guid _uid in userIds)
                    {
                        users.Add(new Pair(_uid, UserStatus.Owner));
                    }

                    Sharing.Comment comment = SharingController.get_comment(applicationId, info.SubjectID.Value, null);
                    info.RefItemID   = comment.PostID;
                    info.Description = comment.Description;
                    break;
                }
                break;

            case ActionType.Question:
                switch (info.SubjectType.Value)
                {
                case SubjectType.Question:
                    if (info.ReceiverUserIDs != null && info.ReceiverUserIDs.Count > 0)
                    {
                        userIds = info.ReceiverUserIDs;
                        foreach (Guid _uid in userIds)
                        {
                            users.Add(new Pair(_uid, UserStatus.Contributor));
                        }
                    }
                    break;
                }
                break;

            case ActionType.Answer:
                switch (info.SubjectType.Value)
                {
                case SubjectType.Answer:
                    if ((userIds = __get_audience_user_ids(ref info, UserStatus.Owner)) == null)
                    {
                        userIds = new List <Guid>();
                        Guid?id = QAController.get_question_asker_id(applicationId, info.RefItemID.Value);
                        if (id.HasValue)
                        {
                            userIds.Add(id.Value);
                        }
                    }
                    foreach (Guid _uid in userIds)
                    {
                        users.Add(new Pair(_uid, UserStatus.Owner));
                    }

                    if ((userIds = __get_audience_user_ids(ref info, UserStatus.Fan)) == null)
                    {
                        userIds = GlobalController.get_fan_ids(applicationId, info.RefItemID.Value).ToList();
                    }
                    foreach (Guid _usr in userIds)
                    {
                        users.Add(new Pair(_usr, UserStatus.Fan));
                    }

                    if ((userIds = __get_audience_user_ids(ref info, UserStatus.Contributor)) == null)
                    {
                        userIds = QAController.get_answer_sender_ids(applicationId, info.RefItemID.Value).ToList();
                    }
                    foreach (Guid _usr in userIds)
                    {
                        users.Add(new Pair(_usr, UserStatus.Contributor));
                    }

                    info.SubjectName = QAController.get_question(applicationId, info.RefItemID.Value, null).Title;
                    break;
                }
                break;

            case ActionType.Post:
            case ActionType.Share:
                switch (info.SubjectType.Value)
                {
                case SubjectType.Post:
                    foreach (Guid _usr in mentionedUserIds)
                    {
                        users.Add(new Pair(_usr, UserStatus.Mentioned));
                    }

                    Node node = null;

                    bool isNode = info.RefItemID.HasValue &&
                                  CNController.is_node(applicationId, info.RefItemID.Value);

                    if ((userIds = __get_audience_user_ids(ref info, UserStatus.Director)) != null)
                    {
                        foreach (Guid _usr in userIds)
                        {
                            users.Add(new Pair(_usr, UserStatus.Owner));
                        }
                    }

                    if (isNode)
                    {
                        if ((userIds = __get_audience_user_ids(ref info, UserStatus.Owner)) == null)
                        {
                            userIds = CNController.get_node_creators(applicationId, info.RefItemID.Value).Select(
                                u => u.User.UserID.Value).ToList();
                        }
                        foreach (Guid _usr in userIds)
                        {
                            users.Add(new Pair(_usr, UserStatus.Owner));
                        }

                        if ((userIds = __get_audience_user_ids(ref info, UserStatus.Member)) == null)
                        {
                            userIds = CNController.get_members(applicationId, info.RefItemID.Value,
                                                               pending: false, admin: null).Select(u => u.Member.UserID.Value).ToList();
                        }
                        foreach (Guid _usr in userIds)
                        {
                            users.Add(new Pair(_usr, UserStatus.Member));
                        }

                        if ((userIds = __get_audience_user_ids(ref info, UserStatus.Fan)) == null)
                        {
                            userIds = CNController.get_node_fans_user_ids(applicationId, info.RefItemID.Value).ToList();
                        }
                        foreach (Guid _usr in userIds)
                        {
                            users.Add(new Pair(_usr, UserStatus.Fan));
                        }

                        node = CNController.get_node(applicationId, info.RefItemID.Value);
                        if (node != null)
                        {
                            info.SubjectName = node.Name;
                        }
                    }

                    if (RaaiVanConfig.Modules.SMSEMailNotifier(applicationId))
                    {
                        User user = UsersController.get_user(applicationId, info.Sender.UserID.Value);
                        info.ReplacementDic["SenderProfileImageURL"] =
                            DocumentUtilities.get_personal_image_address(applicationId, user.UserID.Value, true);
                        info.ReplacementDic["SenderFullName"] = user.FirstName + " " + user.LastName;
                        info.ReplacementDic["SenderPageURL"]  =
                            PublicConsts.get_complete_url(applicationId, PublicConsts.HomePage) +
                            "/" + user.UserID.Value.ToString();
                        info.ReplacementDic["PostURL"] =
                            PublicConsts.get_complete_url(applicationId, PublicConsts.PostPage) +
                            "/" + info.SubjectID.Value.ToString();
                        info.ReplacementDic["Description"] = info.Description;

                        if (isNode)
                        {
                            info.ReplacementDic["NodePageURL"] =
                                PublicConsts.get_complete_url(applicationId, PublicConsts.NodePage) +
                                "/" + info.RefItemID.Value.ToString();
                            if (node != null)
                            {
                                info.ReplacementDic["NodeName"] = node.Name;
                            }
                        }
                    }

                    break;
                }
                break;

            case ActionType.Comment:
                switch (info.SubjectType.Value)
                {
                case SubjectType.Comment:
                    foreach (Guid _usr in mentionedUserIds)
                    {
                        users.Add(new Pair(_usr, UserStatus.Mentioned));
                    }

                    if ((userIds = __get_audience_user_ids(ref info, UserStatus.Owner)) == null)
                    {
                        userIds = new List <Guid>();
                        Guid?id = SharingController.get_post_sender_id(applicationId, info.RefItemID.Value);
                        if (id.HasValue)
                        {
                            userIds.Add(id.Value);
                        }
                    }
                    foreach (Guid _uid in userIds)
                    {
                        users.Add(new Pair(_uid, UserStatus.Owner));
                    }

                    if ((userIds = __get_audience_user_ids(ref info, UserStatus.Fan)) == null)
                    {
                        userIds = SharingController.get_post_fan_ids(applicationId, info.RefItemID.Value).ToList();
                    }
                    foreach (Guid _usr in userIds)
                    {
                        users.Add(new Pair(_usr, UserStatus.Fan));
                    }

                    if ((userIds = __get_audience_user_ids(ref info, UserStatus.Contributor)) == null)
                    {
                        userIds = SharingController.get_comment_sender_ids(applicationId, info.RefItemID.Value).ToList();
                    }
                    foreach (Guid _usr in userIds)
                    {
                        users.Add(new Pair(_usr, UserStatus.Contributor));
                    }

                    if (RaaiVanConfig.Modules.SMSEMailNotifier(applicationId))
                    {
                        User user = UsersController.get_user(applicationId, info.Sender.UserID.Value);
                        info.ReplacementDic["SenderProfileImageURL"] =
                            DocumentUtilities.get_personal_image_address(applicationId, user.UserID.Value, true);
                        info.ReplacementDic["SenderFullName"] = user.FirstName + " " + user.LastName;
                        info.ReplacementDic["SenderPageURL"]  =
                            PublicConsts.get_complete_url(applicationId, PublicConsts.ProfilePage) +
                            "/" + user.UserID.Value.ToString();
                        info.ReplacementDic["PostURL"] =
                            PublicConsts.get_complete_url(applicationId, PublicConsts.PostPage) +
                            "/" + info.RefItemID.Value.ToString();
                        info.ReplacementDic["Description"] = info.Description;
                    }

                    break;

                case SubjectType.Question:
                    if ((userIds = __get_audience_user_ids(ref info, UserStatus.Owner)) == null)
                    {
                        userIds = new List <Guid>();
                        Guid?id = QAController.get_question_asker_id(applicationId, info.RefItemID.Value);
                        if (id.HasValue)
                        {
                            userIds.Add(id.Value);
                        }
                    }
                    foreach (Guid _uid in userIds)
                    {
                        users.Add(new Pair(_uid, UserStatus.Owner));
                    }

                    break;

                case SubjectType.Answer:
                    if ((userIds = __get_audience_user_ids(ref info, UserStatus.Owner)) == null)
                    {
                        userIds = new List <Guid>();
                        Guid?commentId = QAController.get_comment_owner_id(applicationId, info.SubjectID.Value);
                        if (commentId.HasValue)
                        {
                            userIds.Add(commentId.Value);
                        }
                    }
                    foreach (Guid _uid in userIds)
                    {
                        users.Add(new Pair(_uid, UserStatus.Owner));
                    }

                    break;
                }
                break;

            case ActionType.Modify:
                switch (info.SubjectType.Value)
                {
                case SubjectType.Wiki:
                    Node node = CNController.get_node(applicationId, info.RefItemID.Value, false);

                    if (node != null && node.NodeID.HasValue)
                    {
                        if ((userIds = __get_audience_user_ids(ref info, UserStatus.Owner)) == null)
                        {
                            userIds = CNController.get_node_creators(applicationId, info.RefItemID.Value).Select(
                                u => u.User.UserID.Value).ToList();
                        }
                        foreach (Guid _usr in userIds)
                        {
                            users.Add(new Pair(_usr, UserStatus.Owner));
                        }

                        if ((userIds = __get_audience_user_ids(ref info, UserStatus.Fan)) == null)
                        {
                            userIds =
                                CNController.get_node_fans_user_ids(applicationId, info.RefItemID.Value).ToList();
                        }
                        foreach (Guid _usr in userIds)
                        {
                            users.Add(new Pair(_usr, UserStatus.Fan));
                        }

                        if ((userIds = __get_audience_user_ids(ref info, UserStatus.Expert)) == null)
                        {
                            userIds = CNController.get_experts(applicationId, info.RefItemID.Value).Select(
                                u => u.User.UserID.Value).ToList();
                        }
                        foreach (Guid _usr in userIds)
                        {
                            users.Add(new Pair(_usr, UserStatus.Expert));
                        }

                        if ((userIds = __get_audience_user_ids(ref info, UserStatus.Member)) == null)
                        {
                            userIds = CNController.get_member_user_ids(applicationId, info.RefItemID.Value);
                        }
                        foreach (Guid _usr in userIds)
                        {
                            users.Add(new Pair(_usr, UserStatus.Member));
                        }

                        if (!users.Exists(u => (UserStatus)u.Second == UserStatus.Owner))
                        {
                            users.Add(new Pair(node.Creator.UserID.Value, UserStatus.Owner));
                        }

                        info.SubjectName = node.Name;
                        info.Info        = "{\"NodeType\":\"" + Base64.encode(node.NodeType) + "\"}";

                        if (RaaiVanConfig.Modules.SMSEMailNotifier(applicationId))
                        {
                            User user = UsersController.get_user(applicationId, info.Sender.UserID.Value);
                            info.ReplacementDic["SenderProfileImageURL"] =
                                DocumentUtilities.get_personal_image_address(applicationId, user.UserID.Value, true);
                            info.ReplacementDic["SenderFullName"] = user.FirstName + " " + user.LastName;
                            info.ReplacementDic["SenderPageURL"]  =
                                PublicConsts.get_complete_url(applicationId, PublicConsts.ProfilePage) +
                                "/" + user.UserID.Value.ToString();
                            info.ReplacementDic["NodeName"]    = node.Name;
                            info.ReplacementDic["NodeType"]    = node.NodeType;
                            info.ReplacementDic["NodePageURL"] =
                                PublicConsts.get_complete_url(applicationId, PublicConsts.NodePage) +
                                "/" + info.RefItemID.Value.ToString();
                            info.ReplacementDic["Description"] = info.Description;
                        }
                    }
                    break;
                }
                break;

            case ActionType.FriendRequest:
                switch (info.SubjectType.Value)
                {
                case SubjectType.User:
                    users.Clear();
                    users.Add(new Pair(info.UserID, UserStatus.Mentioned));

                    info.UserStatus = UserStatus.Mentioned;

                    if (RaaiVanConfig.Modules.SMSEMailNotifier(applicationId))
                    {
                        User user = UsersController.get_user(applicationId, info.RefItemID.Value);
                        info.ReplacementDic["SenderProfileImageURL"] =
                            DocumentUtilities.get_personal_image_address(applicationId, user.UserID.Value, true);
                        info.ReplacementDic["SenderFullName"] = user.FirstName + " " + user.LastName;
                        info.ReplacementDic["SenderPageURL"]  =
                            PublicConsts.get_complete_url(applicationId, PublicConsts.ProfilePage) +
                            "/" + user.UserID.Value.ToString();
                    }

                    break;
                }
                break;

            case ActionType.AcceptFriendRequest:
                switch (info.SubjectType.Value)
                {
                case SubjectType.User:
                    users.Clear();
                    users.Add(new Pair(info.UserID, UserStatus.Mentioned));

                    info.UserStatus = UserStatus.Mentioned;

                    if (RaaiVanConfig.Modules.SMSEMailNotifier(applicationId))
                    {
                        User user = UsersController.get_user(applicationId, info.RefItemID.Value);
                        info.ReplacementDic["SenderProfileImageURL"] =
                            DocumentUtilities.get_personal_image_address(applicationId, user.UserID.Value, true);
                        info.ReplacementDic["SenderFullName"] = user.FirstName + " " + user.LastName;
                        info.ReplacementDic["SenderPageURL"]  =
                            PublicConsts.get_complete_url(applicationId, PublicConsts.ProfilePage) +
                            "/" + user.UserID.Value.ToString();
                    }

                    break;
                }
                break;

            case ActionType.Accept:
                switch (info.SubjectType)
                {
                case SubjectType.Node:
                {
                    if ((userIds = __get_audience_user_ids(ref info, UserStatus.Member)) == null &&
                        info.RefItemID.HasValue)
                    {
                        List <Guid> nIds = CNController.get_related_node_ids(applicationId, info.RefItemID.Value,
                                                                             null, null, false, true);

                        List <Guid> creatorIds =
                            CNController.get_node_creators(applicationId, info.RefItemID.Value)
                            .Select(u => u.User.UserID.Value).ToList();

                        userIds = CNController.get_members(applicationId, nIds,
                                                           pending: false, admin: null).Select(u => u.Member.UserID.Value)
                                  .Distinct().Where(x => !creatorIds.Any(a => a == x)).ToList();
                    }
                    foreach (Guid _usr in userIds)
                    {
                        users.Add(new Pair(_usr, UserStatus.Member));
                    }
                }
                break;
                }
                break;

            case ActionType.Publish:
                switch (info.SubjectType)
                {
                case SubjectType.Question:
                    if ((userIds = __get_audience_user_ids(ref info, UserStatus.Owner)) == null)
                    {
                        userIds = new List <Guid>();
                        Guid?id = QAController.get_question_asker_id(applicationId, info.RefItemID.Value);
                        if (id.HasValue)
                        {
                            userIds.Add(id.Value);
                        }
                    }
                    foreach (Guid _uid in userIds)
                    {
                        users.Add(new Pair(_uid, UserStatus.Owner));
                    }

                    break;
                }
                break;
            }

            users = users.Except(users.Where(u => info.Sender.UserID.HasValue && (Guid)u.First == info.Sender.UserID)).ToList();

            DataProvider.SendNotification(applicationId, ref users, info);

            if (RaaiVanConfig.Modules.SMSEMailNotifier(applicationId))
            {
                NotificationController._send_notification_message(applicationId, users, info);
            }
        }
 public static string get_download_url(Guid applicationId, Guid fileId)
 {
     return(PublicConsts.get_complete_url(applicationId, PublicConsts.FileDownload) +
            "?timeStamp=" + DateTime.Now.Ticks.ToString() + "&FileID=" + fileId.ToString());
 }
Exemplo n.º 5
0
 public static string ValidateURL(Guid?applicationId, string ticket)
 {
     return(get_value(applicationId, RVSettingsItem.SSOValidateURL).Replace("[return_url]",
                                                                            PublicConsts.get_complete_url(applicationId, PublicConsts.LoginPage)).Replace("[ticket]", ticket));
 }
Exemplo n.º 6
0
 public static string LoginURL(Guid?applicationId)
 {
     return(get_value(applicationId, RVSettingsItem.SSOLoginURL).Replace("[return_url]",
                                                                         PublicConsts.get_complete_url(applicationId, PublicConsts.LoginPage)));
 }