-
Notifications
You must be signed in to change notification settings - Fork 11k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #822 from RocketChat/models
Replace Collections by Models
- Loading branch information
Showing
122 changed files
with
1,666 additions
and
907 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
packages/rocketchat-authorization/server/models/Permissions.coffee
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
RocketChat.models.Permissions = new class extends RocketChat.models._Base | ||
constructor: -> | ||
@_initModel 'permissions' | ||
|
||
|
||
# FIND | ||
findByRole: (role, options) -> | ||
query = | ||
roles: role | ||
|
||
return @find query, options |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Meteor.publish 'permissions', -> | ||
console.log '[publish] permissions'.green | ||
return ChatPermissions.find {} | ||
return RocketChat.models.Permissions.find {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ Package.describe({ | |
}); | ||
|
||
Npm.depends({ | ||
ldapjs: "0.7.1", | ||
ldapjs: "0.7.1", | ||
}); | ||
|
||
// Loads all i18n.json files into tapi18nFiles | ||
|
@@ -22,6 +22,7 @@ Package.onUse(function(api) { | |
api.versionsFrom('1.0.3.1'); | ||
|
||
// Commom | ||
api.use('rocketchat:[email protected]'); | ||
api.use('tap:[email protected]'); | ||
api.use('yasaricli:slugify'); | ||
api.use('coffeescript'); | ||
|
@@ -43,7 +44,7 @@ Package.onUse(function(api) { | |
api.addFiles('config_server.coffee', 'server'); | ||
|
||
api.addFiles(tapi18nFiles); | ||
|
||
api.export('LDAP', 'server'); | ||
api.export('LDAP_DEFAULTS', 'server'); | ||
api.export('MeteorWrapperLdapjs'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ | |
# @namespace RocketChat | ||
### | ||
|
||
RocketChat = {} | ||
RocketChat = | ||
models: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,13 +7,15 @@ Package.describe({ | |
|
||
Package.onUse(function(api) { | ||
api.versionsFrom('1.0'); | ||
|
||
api.use('reactive-var'); | ||
api.use('reactive-dict'); | ||
api.use('coffeescript'); | ||
api.use('random'); | ||
api.use('check'); | ||
api.use('underscore'); | ||
api.use('underscorestring:underscore.string'); | ||
api.use('monbro:[email protected]'); | ||
|
||
// TAPi18n | ||
api.use('templating', 'client'); | ||
|
@@ -28,14 +30,33 @@ Package.onUse(function(api) { | |
api.imply('tap:i18n'); | ||
api.addFiles("package-tap.i18n", ["client", "server"]); | ||
|
||
|
||
// COMMON | ||
api.addFiles('lib/core.coffee'); | ||
api.addFiles('lib/callbacks.coffee'); | ||
api.addFiles('lib/slashCommand.coffee'); | ||
|
||
api.addFiles('settings/lib/settings.coffee'); | ||
// MODELS SERVER | ||
api.addFiles('server/models/_Base.coffee', 'server'); | ||
api.addFiles('server/models/Users.coffee', 'server'); | ||
api.addFiles('server/models/Subscriptions.coffee', 'server'); | ||
api.addFiles('server/models/Rooms.coffee', 'server'); | ||
api.addFiles('server/models/Messages.coffee', 'server'); | ||
api.addFiles('server/models/Reports.coffee', 'server'); | ||
|
||
// Settings | ||
api.addFiles('settings/lib/rocketchat.coffee'); | ||
|
||
api.addFiles('settings/server/models/Settings.coffee', 'server'); | ||
api.addFiles('settings/server/methods.coffee', 'server'); | ||
api.addFiles('settings/server/publication.coffee', 'server'); | ||
api.addFiles('settings/server/startup.coffee', 'server'); | ||
api.addFiles('settings/server/updateServices.coffee', 'server'); | ||
api.addFiles('settings/server/addOAuthService.coffee', 'server'); | ||
|
||
api.addFiles('settings/lib/settings.coffee'); | ||
|
||
|
||
// CLIENT | ||
api.addFiles('client/Notifications.coffee', 'client'); | ||
api.addFiles('client/TabBar.coffee', 'client'); | ||
|
@@ -58,13 +79,6 @@ Package.onUse(function(api) { | |
|
||
api.addFiles('server/Notifications.coffee', 'server'); | ||
|
||
// Settings | ||
api.addFiles('settings/server/methods.coffee', 'server'); | ||
api.addFiles('settings/server/publication.coffee', 'server'); | ||
api.addFiles('settings/server/startup.coffee', 'server'); | ||
api.addFiles('settings/server/updateServices.coffee', 'server'); | ||
api.addFiles('settings/server/addOAuthService.coffee', 'server'); | ||
|
||
api.addFiles('server/cdn.coffee', 'server'); | ||
|
||
// TAPi18n -- needs to be added last | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.