xforum 0.0.378 → 0.0.379
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/xforum/people_list.rb +6 -6
- data/lib/xforum/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0adcc543103cd2ecc60621a2a9562d60a17f3679
|
4
|
+
data.tar.gz: d5c9997eb2f6fbbdeee66601090624d2f175bc82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51501c9774888f987bd8e8ca140d4d5890532b3c72eaaae26e3af917d49987bbd96683b98c59463ac0c68bcd0ab278bbbb82f686de9540cce6f98e2f9b7379a5
|
7
|
+
data.tar.gz: 0a3cce0442be303763cf4c64df3e66d913a8c4c4c6a9528cee5c8585958648eb7dc150846cbb670068a4059fa1682671cfd02c6714782a7f8c50dce11f860b5a
|
@@ -106,9 +106,10 @@ module Xforum
|
|
106
106
|
{list_data: ForumAssist.named_array(alist, [:value, :item]), name: params[:list]}
|
107
107
|
end
|
108
108
|
|
109
|
-
def self.check_restrictions(
|
110
|
-
|
111
|
-
|
109
|
+
def self.check_restrictions(alist, user, list_type)
|
110
|
+
blist=[]
|
111
|
+
byebug
|
112
|
+
alist.each { |record|
|
112
113
|
skip=false
|
113
114
|
case list_type
|
114
115
|
when 'topic'
|
@@ -118,15 +119,14 @@ module Xforum
|
|
118
119
|
end
|
119
120
|
if !category.nil? && category.restricted
|
120
121
|
if PeopleList.check_invitation(record[:name],category.id, user.id, 'category')
|
121
|
-
alist.delete(record)
|
122
122
|
skip=true
|
123
123
|
end
|
124
124
|
end
|
125
125
|
unless skip
|
126
|
-
|
126
|
+
blist.push(record) unless record[:restricted] && PeopleList.check_invitation(record[:name],record[:id], user.id, list_type)
|
127
127
|
end
|
128
128
|
}
|
129
|
-
|
129
|
+
blist
|
130
130
|
end
|
131
131
|
|
132
132
|
def self.check_invitation(name,id,user_id,list_type)
|
data/lib/xforum/version.rb
CHANGED