private static int GetAllowGetAttachValue(PostpramsInfo postpramsInfo) { if (Forums.AllowGetAttachByUserID(Forums.GetForumInfo(postpramsInfo.Fid).Permuserlist, postpramsInfo.CurrentUserid)) { return 1; } int result = 0; if (postpramsInfo.Getattachperm.IsNullOrWhiteSpace() || postpramsInfo.Getattachperm == null) { result = postpramsInfo.CurrentUserGroup.AllowGetattach ? 1 : 0; } else { if (Forums.AllowGetAttach(postpramsInfo.Getattachperm, postpramsInfo.Usergroupid)) { result = 1; } } return result; }